[aseprite] 146/308: Reduce size hint for ui::ComboBox

Tobias Hansen thansen at moszumanska.debian.org
Tue Mar 8 02:45:03 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 65dd457847a7c6654d6f96974e6bf911deda1373
Author: David Capello <davidcapello at gmail.com>
Date:   Tue Dec 22 17:14:26 2015 -0300

    Reduce size hint for ui::ComboBox
---
 src/ui/combobox.cpp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/ui/combobox.cpp b/src/ui/combobox.cpp
index 33deb32..ddf508a 100644
--- a/src/ui/combobox.cpp
+++ b/src/ui/combobox.cpp
@@ -395,8 +395,8 @@ void ComboBox::onResize(ResizeEvent& ev)
 
 void ComboBox::onSizeHint(SizeHintEvent& ev)
 {
-  Size reqSize(0, 0);
   Size entrySize = m_entry->sizeHint();
+  Size reqSize = entrySize;
 
   // Get the text-length of every item and put in 'w' the maximum value
   ListItems::iterator it, end = m_items.end();
@@ -404,14 +404,11 @@ void ComboBox::onSizeHint(SizeHintEvent& ev)
     int item_w =
       2*guiscale()+
       font()->textLength((*it)->text().c_str())+
-      10*guiscale();
+      16*guiscale();
 
     reqSize.w = MAX(reqSize.w, item_w);
   }
 
-  reqSize.w += entrySize.w;
-  reqSize.h += entrySize.h;
-
   Size buttonSize = m_button->sizeHint();
   reqSize.w += buttonSize.w;
   reqSize.h = MAX(reqSize.h, buttonSize.h);

-- 
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