>From a8344a6f3828903df04400743d904c002067ea08 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sun, 20 Oct 2013 00:56:12 +0200 Subject: [PATCH] [gui] Split the layout into two columns In my system ttfautohint window is too long and does not fit into the screen for some reason, making the run button not accessible, and GNOME Shell (in its infinite wisdom) does not let me move the window beyond its top bar. With this patch the controls are split into two columns (three actually, the middle column is empty for padding), so that it fits more nicely in the screen. --- frontend/maingui.cpp | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/frontend/maingui.cpp b/frontend/maingui.cpp index aaac0de..96443eb 100644 --- a/frontend/maingui.cpp +++ b/frontend/maingui.cpp @@ -1071,7 +1071,7 @@ Main_GUI::create_layout() // // stem width and positioning // - stem_label = new QLabel(tr("Strong Stem &Width and Positioning:")); + stem_label = new QLabel(tr("Strong Stem &Width and Positioning:")); stem_label->setToolTip( tr("TTFautohint provides two different hinting algorithms" " that can be selected for various hinting modes." @@ -1161,28 +1161,26 @@ Main_GUI::create_layout() gui_layout->addWidget(snapping_label, row, 0, Qt::AlignRight); gui_layout->addWidget(snapping_line, row++, 1, Qt::AlignLeft); - gui_layout->setRowMinimumHeight(row, 20); // XXX urgh, pixels... - gui_layout->setRowStretch(row++, 1); - - gui_layout->addWidget(wincomp_box, row++, 1); - gui_layout->addWidget(pre_box, row++, 1); - gui_layout->addWidget(hint_box, row++, 1); - gui_layout->addWidget(symbol_box, row++, 1); - gui_layout->addWidget(dehint_box, row++, 1); - gui_layout->addWidget(info_box, row++, 1); + gui_layout->setColumnMinimumWidth(2, 20); // XXX urgh, pixels... + gui_layout->setColumnStretch(2, 1); - gui_layout->setRowMinimumHeight(row, 20); // XXX urgh, pixels... - gui_layout->setRowStretch(row++, 1); + row = 4; + gui_layout->addWidget(wincomp_box, row++, 3); + gui_layout->addWidget(pre_box, row++, 3); + gui_layout->addWidget(hint_box, row++, 3); + gui_layout->addWidget(symbol_box, row++, 3); + gui_layout->addWidget(dehint_box, row++, 3); + gui_layout->addWidget(info_box, row++, 3); - gui_layout->addWidget(stem_label, row, 0, Qt::AlignRight); - gui_layout->addWidget(gray_box, row++, 1); - gui_layout->addWidget(gdi_box, row++, 1); - gui_layout->addWidget(dw_box, row++, 1); + gui_layout->addWidget(stem_label, row++, 3); + gui_layout->addWidget(gray_box, row++, 3); + gui_layout->addWidget(gdi_box, row++, 3); + gui_layout->addWidget(dw_box, row++, 3); gui_layout->setRowMinimumHeight(row, 20); // XXX urgh, pixels... - gui_layout->setRowStretch(row++, 1); + gui_layout->setRowStretch(row++, 3); - gui_layout->addWidget(run_button, row++, 1, Qt::AlignRight); + gui_layout->addWidget(run_button, row++, 3, Qt::AlignRight); // create dummy widget to register layout QWidget* main_widget = new QWidget; -- 1.8.4.1