Skip to content

Commit

Permalink
Shell|GUI: Improved Preferences dialog
Browse files Browse the repository at this point in the history
Enabling and disabling a folder selector now should look better.
  • Loading branch information
skyjake committed Feb 17, 2013
1 parent 11f6221 commit 2660347
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doomsday/tools/shell/shell-gui/src/folderselection.cpp
Expand Up @@ -88,6 +88,21 @@ void FolderSelection::setPath(de::NativePath const &path)
d->edit->setText(path.toString());
}

void FolderSelection::setEnabled(bool yes)
{
d->edit->setEnabled(yes);
d->button->setEnabled(yes);

if(yes)
{
d->edit->setStyleSheet("");
}
else
{
d->edit->setStyleSheet("background-color:#eee; color:#888;");
}
}

de::NativePath FolderSelection::path() const
{
return d->edit->text();
Expand Down
3 changes: 3 additions & 0 deletions doomsday/tools/shell/shell-gui/src/folderselection.h
Expand Up @@ -37,6 +37,9 @@ class FolderSelection : public QWidget

void setPath(de::NativePath const &path);

void setEnabled(bool yes);
void setDisabled(bool yes) { setEnabled(!yes); }

de::NativePath path() const;

signals:
Expand Down
1 change: 1 addition & 0 deletions doomsday/tools/shell/shell-gui/src/localserverdialog.cpp
Expand Up @@ -73,6 +73,7 @@ DENG2_PIMPL(LocalServerDialog)
form->addRow(tr("&Game mode:"), games);

QPushButton *opt = new QPushButton(tr("Game &Options..."));
opt->setDisabled(true);
form->addRow(0, opt);

QHBoxLayout *hb = new QHBoxLayout;
Expand Down

0 comments on commit 2660347

Please sign in to comment.