Mercurial > hg > octave-nkf
diff libgui/src/m-editor/file-editor-tab.cc @ 20051:72fe9df87fe8
improve scalability of gui objects (as discussed in bug #41938)
* files-dock-widget.cc (files_dock_widget): adjust size policy of combo box
* history-dock-widget.cc (history_dock_widget): adjust size policy of combo box
* workspace-view.cc (workspace_view): adjust size policy of combo box
* file-editor-tab.cc (file_editor_tab): make size of eol, line and col indicator
depending on font size
* main-window.cc (construct_tool_bar): make size of combo box for worling dir
depending on font size and adjust size policy
* main-window.h: remove static variable for combo box width
* settings-dialog.cc (read_lexer_settings): make width of labels and font combo
boxes for editor styles depeding on font size
* settings-dialog.ui: adjusted size policies of several objects
author | Torsten <ttl@justmail.de> |
---|---|
date | Tue, 24 Feb 2015 07:12:13 +0100 |
parents | a09471d938a5 |
children | ded81845c597 |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -91,16 +91,17 @@ // eol mode QLabel *eol_label = new QLabel (tr ("eol:"), this); _eol_indicator = new QLabel ("",this); - _eol_indicator->setMinimumSize (35,0); + QFontMetrics fm = eol_label->fontMetrics (); + _eol_indicator->setMinimumSize (5*fm.averageCharWidth (),0); _status_bar->addPermanentWidget (eol_label, 0); _status_bar->addPermanentWidget (_eol_indicator, 0); // row- and col-indicator _row_indicator = new QLabel ("", this); - _row_indicator->setMinimumSize (30,0); + _row_indicator->setMinimumSize (5*fm.averageCharWidth (),0); QLabel *row_label = new QLabel (tr ("line:"), this); _col_indicator = new QLabel ("", this); - _col_indicator->setMinimumSize (25,0); + _col_indicator->setMinimumSize (4*fm.averageCharWidth (),0); QLabel *col_label = new QLabel (tr ("col:"), this); _status_bar->addPermanentWidget (row_label, 0); _status_bar->addPermanentWidget (_row_indicator, 0);