Mercurial > hg > octave-nkf
changeset 16749:c9007267cbf5
Variation of color option layouts with columns packed to the left
* settings-dialog.cc (settings_dialog::read_workspace_colors,
settings_dialog::read_terminal_colors): Add 4 space characters to front of
color description. Set the column stretch for last (blank) column to 10.
author | Daniel J Sebald <daniel.sebald@ieee.org> |
---|---|
date | Tue, 11 Jun 2013 14:02:41 -0500 |
parents | 28a58b06e4ff |
children | fd5a4b7f59f7 |
files | libgui/src/settings-dialog.cc |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/settings-dialog.cc +++ b/libgui/src/settings-dialog.cc @@ -327,7 +327,7 @@ int row = 0; for (int i = 0; i < nr_of_classes; i++) { - description[i] = new QLabel (class_names.at (i)); + description[i] = new QLabel (" " + class_names.at (i)); description[i]->setAlignment (Qt::AlignRight); QVariant default_var = default_colors.at (i); QColor setting_color = settings->value ("workspaceview/color_"+class_chars.mid (i,1), @@ -339,6 +339,7 @@ style_grid->addWidget (color[i], row, 3*column+1); if (++column == 3) { + style_grid->setColumnStretch (4*column, 10); row++; column = 0; } @@ -365,7 +366,7 @@ int row = 0; for (int i = 0; i < nr_of_classes; i++) { - description[i] = new QLabel (class_names.at (i)); + description[i] = new QLabel (" " + class_names.at (i)); description[i]->setAlignment (Qt::AlignRight); QVariant default_var = default_colors.at (i); QColor setting_color = settings->value ("terminal/color_"+class_chars.mid (i,1), @@ -375,12 +376,9 @@ color[i]->setMinimumSize (30, 10); style_grid->addWidget (description[i], row, 2*column); style_grid->addWidget (color[i], row, 2*column+1); - style_grid->setColumnStretch (2*column, 10); - style_grid->setColumnStretch (2*column+1, 10); if (++column == 2) { style_grid->setColumnStretch (3*column, 10); - style_grid->setColumnStretch (3*column+1, 10); row++; column = 0; }