[aseprite] 86/308: Use a hot region equal to the whole manager area for UserDataPopup
Tobias Hansen
thansen at moszumanska.debian.org
Tue Mar 8 02:44:55 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 eb6b57c5fbfbf7d8484ee52d9bf84e169118d241
Author: David Capello <davidcapello at gmail.com>
Date: Fri Dec 11 13:45:02 2015 -0300
Use a hot region equal to the whole manager area for UserDataPopup
---
src/app/ui/user_data_popup.cpp | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/app/ui/user_data_popup.cpp b/src/app/ui/user_data_popup.cpp
index bdea74c..2568476 100644
--- a/src/app/ui/user_data_popup.cpp
+++ b/src/app/ui/user_data_popup.cpp
@@ -19,13 +19,31 @@ namespace app {
using namespace ui;
+namespace {
+
+class UserDataPopup : public app::gen::UserData {
+public:
+ UserDataPopup() {
+ makeFixed();
+ setClickBehavior(ClickBehavior::CloseOnClickInOtherWindow);
+ setEnterBehavior(EnterBehavior::CloseOnEnter);
+ setCloseOnKeyDown(false);
+
+ // The whole manager as hot region
+ setHotRegion(gfx::Region(manager()->bounds()));
+ }
+};
+
+} // anonymous namespace
+
bool show_user_data_popup(const gfx::Rect& bounds,
doc::UserData& userData)
{
- app::gen::UserData window;
+ UserDataPopup window;
+
window.text()->setText(userData.text());
- window.setCloseOnKeyDown(false);
window.pointAt(TOP, bounds);
+
window.openWindowInForeground();
if (userData.text() != window.text()->text()) {
--
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