[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] (no subject)
From: |
Greg Chicares |
Subject: |
[lmi-commits] (no subject) |
Date: |
Sat, 28 May 2016 01:28:06 +0000 (UTC) |
branch: master
commit 63bb9fea9aa48de3d75c8ad39f77a11075b9eb29
Author: Vadim Zeitlin <address@hidden>
Date: Sat Apr 2 00:44:39 2016 +0200
Resize sequence editor labels less aggressively
Use wxST_NO_AUTORESIZE for labels in the input sequence editor.
There is no need to resize these labels when their text changes as the
whole dialog is re-laid out anyhow whenever it happens and not doing
it makes it appear slightly faster when it contains many rows.
---
input_sequence_entry.cpp | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/input_sequence_entry.cpp b/input_sequence_entry.cpp
index 737384d..a4fc94a 100644
--- a/input_sequence_entry.cpp
+++ b/input_sequence_entry.cpp
@@ -381,7 +381,14 @@ InputSequenceEditor::InputSequenceEditor(wxWindow* parent,
wxString const& title
sizer_ = new(wx) wxFlexGridSizer(Col_Max, sizerGap);
rows_area_->SetSizer(sizer_);
- diagnostics_ = new(wx) wxStaticText(this, wxID_ANY, "");
+ diagnostics_ = new(wx) wxStaticText
+ (this
+ ,wxID_ANY
+ ,""
+ ,wxDefaultPosition
+ ,wxDefaultSize
+ ,wxST_NO_AUTORESIZE
+ );
top->Add(diagnostics_,
wxSizerFlags().Expand().DoubleBorder(wxLEFT|wxRIGHT));
wxStdDialogButtonSizer* buttons = new(wx) wxStdDialogButtonSizer();
@@ -615,7 +622,14 @@ void InputSequenceEditor::insert_row(int new_row)
}
sizer_->wxSizer::Insert(insert_pos++, value_ctrl,
wxSizerFlags(flags).TripleBorder(wxRIGHT));
- wxStaticText* from_label = new(wx) wxStaticText(rows_area_, wxID_ANY,
LARGEST_FROM_TEXT);
+ wxStaticText* from_label = new(wx) wxStaticText
+ (rows_area_
+ ,wxID_ANY
+ ,LARGEST_FROM_TEXT
+ ,wxDefaultPosition
+ ,wxDefaultSize
+ ,wxST_NO_AUTORESIZE
+ );
SizeWinForText(from_label, LARGEST_FROM_TEXT);
sizer_->wxSizer::Insert(insert_pos++, from_label, flags);
wxChoice* duration_mode = new(wx) DurationModeChoice(rows_area_);
@@ -623,7 +637,14 @@ void InputSequenceEditor::insert_row(int new_row)
wxSpinCtrl* duration_num = new(wx) wxSpinCtrl(rows_area_, wxID_ANY, "");
sizer_->wxSizer::Insert(insert_pos++, duration_num, flags);
SizeWinForText(duration_num, "9999", 20);
- wxStaticText* then_label = new(wx) wxStaticText(rows_area_, wxID_ANY,
LARGEST_THEN_TEXT);
+ wxStaticText* then_label = new(wx) wxStaticText
+ (rows_area_
+ ,wxID_ANY
+ ,LARGEST_THEN_TEXT
+ ,wxDefaultPosition
+ ,wxDefaultSize
+ ,wxST_NO_AUTORESIZE
+ );
sizer_->wxSizer::Insert(insert_pos++, then_label, flags);
SizeWinForText(then_label, LARGEST_THEN_TEXT);
- [lmi-commits] [lmi] master updated (0798ad3 -> b27a3af), Greg Chicares, 2016/05/27
- [lmi-commits] (no subject), Greg Chicares, 2016/05/27
- [lmi-commits] (no subject), Greg Chicares, 2016/05/27
- [lmi-commits] (no subject), Greg Chicares, 2016/05/27
- [lmi-commits] (no subject), Greg Chicares, 2016/05/27
- [lmi-commits] (no subject), Greg Chicares, 2016/05/27
- [lmi-commits] (no subject),
Greg Chicares <=
- [lmi-commits] (no subject), Greg Chicares, 2016/05/27
- [lmi-commits] (no subject), Greg Chicares, 2016/05/27