[vlc-devel] [PATCH] qt: Size extra-metadata columns to contents

FeRD (Frank Dana) ferdnyc at gmail.com
Sat Sep 28 04:23:21 CEST 2019


Set the SectionResizeMode of column headers (and row headers) of the
extra-metadata table to QHeaderView::ResizeToContents, to correctly
display the table data.

Without these properties set, the left (key) column is sized far too
narrow and cuts off most of the text. Many rows are unnecessarily
tall, with their right (value) column's contents vertically centered.

Signed-off-by: FeRD (Frank Dana) <ferdnyc at gmail.com>
---
  modules/gui/qt/components/info_panels.cpp | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/modules/gui/qt/components/info_panels.cpp 
b/modules/gui/qt/components/info_panels.cpp
index 73ee351c5e..4c290c40db 100644
--- a/modules/gui/qt/components/info_panels.cpp
+++ b/modules/gui/qt/components/info_panels.cpp
@@ -383,7 +383,9 @@ ExtraMetaPanel::ExtraMetaPanel( QWidget *parent ) : 
QWidget( parent )
       extraMeta->horizontalHeader()->hide();
       extraMeta->verticalHeader()->hide();
  +     extraMeta->horizontalHeader()->setSectionResizeMode( 
QHeaderView::ResizeToContents );
       extraMeta->horizontalHeader()->setStretchLastSection(true);
+     extraMeta->verticalHeader()->setSectionResizeMode( 
QHeaderView::ResizeToContents );
       extraMeta->resizeRowsToContents();
        extraMeta->setVerticalScrollMode( 
QAbstractItemView::ScrollPerPixel );
-- 
2.21.0



More information about the vlc-devel mailing list