[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] [PATCH 2/2] Make InputSequenceEntry's "..." button smaller.
From: |
Vaclav Slavik |
Subject: |
[lmi] [PATCH 2/2] Make InputSequenceEntry's "..." button smaller. |
Date: |
Wed, 29 Jun 2011 18:34:25 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 |
Fixes two issues with it:
1) Match height of wxTextCtrl. It was a few pixels taller before,
because wxButton's default height was apparently too big. This made the
whole control too tall. Fixed by setting the height to nonsense value of
1; sizers will take care of sizing it appropriately.
2) The button was a bit too big, because default wxButton content
padding is generous. Explicitly size it to a bit over the size of the
"..." label, to make it smaller and leave more space for the actual
content of the control.
---
input_sequence_entry.cpp | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/input_sequence_entry.cpp b/input_sequence_entry.cpp
index b42003f..9accfd8 100644
--- a/input_sequence_entry.cpp
+++ b/input_sequence_entry.cpp
@@ -1063,6 +1063,11 @@ InputSequenceButton::InputSequenceButton(wxWindow*
parent, wxWindowID id)
);
SetToolTip("Open sequence editor");
+
+ // Set vertical size to 1px - it's ridiculously small, but the sizers will
make it as
+ // tall as the text control. Use text extent of "..." for width, because
standard
+ // buttons use more padding.
+ SetMinSize(wxSize(8 + GetTextExtent(GetLabel()).x, 1));
}
void InputSequenceButton::UponKillFocus(wxFocusEvent& event)
--
1.7.5.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi] [PATCH 2/2] Make InputSequenceEntry's "..." button smaller.,
Vaclav Slavik <=