diff options
author | sje397 <sje397@gmail.com> | 2012-02-18 01:34:53 +1100 |
---|---|---|
committer | sje397 <sje397@gmail.com> | 2012-04-11 00:07:32 +1000 |
commit | 86d5634941734cbde54e47fc6288f21104acf26e (patch) | |
tree | 92d639cc51a3d725e66d09a78cbbcbf2e69e78cb /src/qt/optionsdialog.cpp | |
parent | 962e2fcdb6aa43c9998b2be2ff96a679ff9db660 (diff) |
Toggle main window hide on tray icon click
- converted openBictoinAction to toggleHideAction
- put GUIUtil functions into a namespace instead of a class
- put window-related functions together in optionsdialog
Reasoning:
- toggle is more typical behaviour
- it's more functional
- better UX
The typical issue with toggling visibility is that when a window
is obscured by other windows but in the 'shown' state, hiding it
isn't what you want. I've added an 'isObscured' function to GUIUtil
that checks several pixels in the window to see if they are visible
on the desktop so that an obscured but shown window can be raised.
Conflicts:
src/qt/guiutil.cpp
src/qt/guiutil.h
Diffstat (limited to 'src/qt/optionsdialog.cpp')
-rw-r--r-- | src/qt/optionsdialog.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index 75fd4ccf18..34d303233c 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -175,18 +175,16 @@ MainOptionsPage::MainOptionsPage(QWidget *parent): minimize_to_tray = new QCheckBox(tr("&Minimize to the tray instead of the taskbar")); minimize_to_tray->setToolTip(tr("Show only a tray icon after minimizing the window")); layout->addWidget(minimize_to_tray); -#endif - - map_port_upnp = new QCheckBox(tr("Map port using &UPnP")); - map_port_upnp->setToolTip(tr("Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.")); - layout->addWidget(map_port_upnp); -#ifndef Q_WS_MAC minimize_on_close = new QCheckBox(tr("M&inimize on close")); minimize_on_close->setToolTip(tr("Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.")); layout->addWidget(minimize_on_close); #endif + map_port_upnp = new QCheckBox(tr("Map port using &UPnP")); + map_port_upnp->setToolTip(tr("Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.")); + layout->addWidget(map_port_upnp); + connect_socks4 = new QCheckBox(tr("&Connect through SOCKS4 proxy:")); connect_socks4->setToolTip(tr("Connect to the Bitcon network through a SOCKS4 proxy (e.g. when connecting through Tor)")); layout->addWidget(connect_socks4); |