summaryrefslogtreecommitdiff
path: root/src/gui/windowmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-02 04:43:18 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-02 04:43:18 +0300
commitc845e800f0d4b17bc5ce65806fa5fadd9468c858 (patch)
treea6bc48691aba3a2dd0e88aa18bc3a17a842bf76b /src/gui/windowmenu.cpp
parentbebb93a423a9f6bc7a2b7a610548da6ceaacee97 (diff)
downloadplus-c845e800f0d4b17bc5ce65806fa5fadd9468c858.tar.gz
plus-c845e800f0d4b17bc5ce65806fa5fadd9468c858.tar.bz2
plus-c845e800f0d4b17bc5ce65806fa5fadd9468c858.tar.xz
plus-c845e800f0d4b17bc5ce65806fa5fadd9468c858.zip
Change auto hide screen buttons to 3 states
(always show, hide in small window, always hide)
Diffstat (limited to 'src/gui/windowmenu.cpp')
-rw-r--r--src/gui/windowmenu.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index c57cd8974..6133c69e0 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -60,7 +60,7 @@ extern Window *socialWindow;
WindowMenu::WindowMenu():
mEmotePopup(nullptr),
mHaveMouse(false),
- mAutoHide(true)
+ mAutoHide(1)
{
int x = 0, h = 0;
@@ -114,7 +114,7 @@ WindowMenu::WindowMenu():
setVisible(true);
config.addListener("autohideButtons", this);
- mAutoHide = config.getBoolValue("autohideButtons");
+ mAutoHide = config.getIntValue("autohideButtons");
}
WindowMenu::~WindowMenu()
@@ -401,12 +401,15 @@ void WindowMenu::saveButtons()
void WindowMenu::drawChildren(gcn::Graphics* graphics)
{
- if (!mAutoHide || mHaveMouse)
+ if (mHaveMouse || !mAutoHide || (mAutoHide == 1
+ && mainGraphics && mainGraphics->mWidth > 800))
+ {
Container::drawChildren(graphics);
+ }
}
void WindowMenu::optionChanged(const std::string &name)
{
if (name == "autohideButtons")
- mAutoHide = config.getBoolValue("autohideButtons");
+ mAutoHide = config.getIntValue("autohideButtons");
}