comparison libgui/src/m-editor/file-editor.cc @ 18724:834f6e604dc3 gui-release

use defaults size for tab heights in editor and doc widget (bug #42144) * file-editor.cc (notice_settings): do not change the max height in style sheet * webinfo.cc (constructor): do not change the max height of the tabs
author Torsten <ttl@justmail.de>
date Sun, 27 Apr 2014 20:12:07 +0200
parents fac35875f6eb
children 64bd9afac22c
comparison
equal deleted inserted replaced
18723:fac35875f6eb 18724:834f6e604dc3
1028 int tab_width_min = settings->value ("editor/notebook_tab_width_min", 160) 1028 int tab_width_min = settings->value ("editor/notebook_tab_width_min", 160)
1029 .toInt (); 1029 .toInt ();
1030 int tab_width_max = settings->value ("editor/notebook_tab_width_max", 300) 1030 int tab_width_max = settings->value ("editor/notebook_tab_width_max", 300)
1031 .toInt (); 1031 .toInt ();
1032 1032
1033 QString style_sheet;
1034 if (settings->value ("editor/longWindowTitle", false).toBool ()) 1033 if (settings->value ("editor/longWindowTitle", false).toBool ())
1035 { 1034 {
1036 style_sheet = QString ("QTabBar::tab {max-height: 4ex; " 1035 QString style_sheet = QString ("QTabBar::tab "
1037 "min-width: %1px; max-width: %2px;}") 1036 "{min-width: %1px; max-width: %2px;}")
1038 .arg (tab_width_min).arg (tab_width_max); 1037 .arg (tab_width_min).arg (tab_width_max);
1039 _tab_widget->setElideMode (Qt::ElideLeft); 1038 _tab_widget->setElideMode (Qt::ElideLeft);
1039 _tab_widget->setStyleSheet (style_sheet);
1040 } 1040 }
1041 else 1041 else
1042 { 1042 _tab_widget->setElideMode (Qt::ElideNone);
1043 style_sheet = QString ("QTabBar::tab {max-height: 4ex;}");
1044 _tab_widget->setElideMode (Qt::ElideNone);
1045 }
1046 1043
1047 _tab_widget->setUsesScrollButtons (true); 1044 _tab_widget->setUsesScrollButtons (true);
1048 _tab_widget->setStyleSheet (style_sheet);
1049 1045
1050 set_shortcuts (); 1046 set_shortcuts ();
1051 1047
1052 // Relay signal to file editor tabs. 1048 // Relay signal to file editor tabs.
1053 emit fetab_settings_changed (settings); 1049 emit fetab_settings_changed (settings);