summaryrefslogtreecommitdiff
path: root/wx+/popup_dlg.cpp
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2023-05-19 09:24:58 -0400
committerB. Stack <bgstack15@gmail.com>2023-05-19 09:24:58 -0400
commit90bc692185a27f18acb6b029dfaf038e555ef8ff (patch)
treefdb56193bab28d36a4c6723bf847f3aa2ce36a9b /wx+/popup_dlg.cpp
parentadd upstream 12.2 (diff)
downloadFreeFileSync-90bc692185a27f18acb6b029dfaf038e555ef8ff.tar.gz
FreeFileSync-90bc692185a27f18acb6b029dfaf038e555ef8ff.tar.bz2
FreeFileSync-90bc692185a27f18acb6b029dfaf038e555ef8ff.zip
add upstream 12.312.3
Diffstat (limited to 'wx+/popup_dlg.cpp')
-rw-r--r--wx+/popup_dlg.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/wx+/popup_dlg.cpp b/wx+/popup_dlg.cpp
index b5a194ad..9f29badc 100644
--- a/wx+/popup_dlg.cpp
+++ b/wx+/popup_dlg.cpp
@@ -91,6 +91,17 @@ void setBestInitialSize(wxRichTextCtrl& ctrl, const wxString& text, wxSize maxSi
}
+int zen::getTextCtrlHeight(wxTextCtrl& ctrl, double rowCount)
+{
+ const int rowHeight =
+ ctrl.GetTextExtent(L"X").GetHeight();
+
+ return std::round(
+ 2 +
+ rowHeight * rowCount);
+}
+
+
class zen::StandardPopupDialog : public PopupDialogGenerated
{
public:
@@ -277,8 +288,8 @@ public:
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
#ifdef __WXGTK3__
- Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
- Hide(); //avoid old position flash when Center() moves window (asynchronously?)
+ Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088
+ Hide(); //avoid old position flash when Center() moves window (asynchronously?)
#endif
Center(); //needs to be re-applied after a dialog size change!
bgstack15