[aseprite] 102/128: Go to frame field in status bar isn't focused by default anymore (fix #1113)
Tobias Hansen
thansen at moszumanska.debian.org
Mon May 9 21:24:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit 97d9b3cb31b465a1bb532d3ddd507bcee3ff5d1d
Author: David Capello <davidcapello at gmail.com>
Date: Wed May 4 10:00:54 2016 -0300
Go to frame field in status bar isn't focused by default anymore (fix #1113)
---
data/pref.xml | 3 +++
src/app/ui/status_bar.cpp | 16 +++++++++++++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/data/pref.xml b/data/pref.xml
index db9fa1e..b7cc6e4 100644
--- a/data/pref.xml
+++ b/data/pref.xml
@@ -123,6 +123,9 @@
<section id="news">
<option id="cache_file" type="std::string" />
</section>
+ <section id="status_bar">
+ <option id="focus_frame_field_on_mouseover" type="bool" default="false" />
+ </section>
<section id="color_bar">
<option id="box_size" type="int" default="11" />
<option id="fg_color" type="app::Color" default="app::Color::fromRgb(255, 255, 255)" />
diff --git a/src/app/ui/status_bar.cpp b/src/app/ui/status_bar.cpp
index f6078e4..0e5314d 100644
--- a/src/app/ui/status_bar.cpp
+++ b/src/app/ui/status_bar.cpp
@@ -436,11 +436,14 @@ public:
bool onProcessMessage(Message* msg) override {
switch (msg->type()) {
+
// When the mouse enter in this entry, it got the focus and the
// text is automatically selected.
case kMouseEnterMessage:
- requestFocus();
- selectText(0, -1);
+ if (Preferences::instance().statusBar.focusFrameFieldOnMouseover()) {
+ requestFocus();
+ selectText(0, -1);
+ }
break;
case kKeyDownMessage: {
@@ -459,12 +462,19 @@ public:
}
// Select the text again
selectText(0, -1);
+ releaseFocus();
return true; // Key used.
}
break;
}
}
- return Entry::onProcessMessage(msg);
+
+ bool result = Entry::onProcessMessage(msg);
+
+ if (msg->type() == kMouseDownMessage)
+ selectText(0, -1);
+
+ return result;
}
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list