Sat, 20 Apr 2013 04:26:36 +0300
some GUI tweaks
gldraw.cpp | file | annotate | diff | comparison | revisions | |
zz_configDialog.cpp | file | annotate | diff | comparison | revisions |
--- a/gldraw.cpp Sat Apr 20 04:18:22 2013 +0300 +++ b/gldraw.cpp Sat Apr 20 04:26:36 2013 +0300 @@ -89,7 +89,7 @@ QColor col (gl_maincolor.value.chars()); if (!col.isValid ()) - return col; // shouldn't happen + return QColor (0, 0, 0); // shouldn't happen col.setAlpha (gl_maincolor_alpha * 255.f); return col;
--- a/zz_configDialog.cpp Sat Apr 20 04:18:22 2013 +0300 +++ b/zz_configDialog.cpp Sat Apr 20 04:26:36 2013 +0300 @@ -66,7 +66,7 @@ layout->addWidget (qButtons); setLayout (layout); - setWindowTitle (APPNAME_DISPLAY " - editing settings"); + setWindowTitle (APPNAME_DISPLAY " - Settings"); setWindowIcon (QIcon ("icons/settings.png")); } @@ -78,16 +78,20 @@ // ========================================================================= // LDraw path + qLDrawPathLabel = new QLabel ("LDraw path:"); + qLDrawPath = new QLineEdit; qLDrawPath->setText (io_ldpath.value.chars()); - qLDrawPathLabel = new QLabel ("LDraw path:"); - qLDrawPathFindButton = new QPushButton; qLDrawPathFindButton->setIcon (QIcon ("icons/folder.png")); connect (qLDrawPathFindButton, SIGNAL (clicked ()), this, SLOT (slot_findLDrawPath ())); + QHBoxLayout* qLDrawPathLayout = new QHBoxLayout; + qLDrawPathLayout->addWidget (qLDrawPath); + qLDrawPathLayout->addWidget (qLDrawPathFindButton); + // ========================================================================= // Background and foreground colors qGLBackgroundLabel = new QLabel ("Background color:"); @@ -128,8 +132,7 @@ QGridLayout* layout = new QGridLayout; layout->addWidget (qLDrawPathLabel, 0, 0); - layout->addWidget (qLDrawPath, 0, 1, 1, 2); - layout->addWidget (qLDrawPathFindButton, 0, 3); + layout->addLayout (qLDrawPathLayout, 0, 1, 1, 3); layout->addWidget (qGLBackgroundLabel, 1, 0); layout->addWidget (qGLBackgroundButton, 1, 1); @@ -144,9 +147,9 @@ layout->addWidget (qToolBarIconSizeLabel, 3, 0); layout->addWidget (qToolBarIconSize, 3, 1); - layout->addWidget (qLVColorize, 4, 0); - layout->addWidget (qGLColorBFC, 5, 0); - layout->addWidget (qGLSelFlash, 6, 0); + layout->addWidget (qLVColorize, 4, 0, 1, 4); + layout->addWidget (qGLColorBFC, 5, 0, 1, 4); + layout->addWidget (qGLSelFlash, 6, 0, 1, 4); qMainTab->setLayout (layout); // Add the tab to the manager @@ -167,6 +170,10 @@ ulong i = 0; for (actionmeta meta : g_ActionMeta) { QAction* const qAct = *meta.qAct; + + if (qAct->isEnabled() == false) + continue; + QListWidgetItem* qItem = new QListWidgetItem; setShortcutText (qItem, meta); qItem->setIcon (qAct->icon ());