summaryrefslogtreecommitdiff
path: root/wx+/popup_dlg.cpp
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-01-04 16:21:19 +0000
committerB. Stack <bgstack15@gmail.com>2022-01-04 16:21:19 +0000
commit2c8ae2c99308b4f0bf2bb08161829efee43e31ca (patch)
treeb8252ff8a09d9143ed2dc299d082f9d86535c1a2 /wx+/popup_dlg.cpp
parentMerge branch 'b11.15' into 'master' (diff)
parentadd upstream 11.16 (diff)
downloadFreeFileSync-11.16.tar.gz
FreeFileSync-11.16.tar.bz2
FreeFileSync-11.16.zip
Merge branch 'b11.16' into 'master'11.16
add upstream 11.16 See merge request opensource-tracking/FreeFileSync!40
Diffstat (limited to 'wx+/popup_dlg.cpp')
-rw-r--r--wx+/popup_dlg.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/wx+/popup_dlg.cpp b/wx+/popup_dlg.cpp
index 3d4077c3..703371c2 100644
--- a/wx+/popup_dlg.cpp
+++ b/wx+/popup_dlg.cpp
@@ -16,7 +16,7 @@
#include "popup_dlg_generated.h"
#include "std_button_layout.h"
#include "taskbar.h"
- #include "window_tools.h"
+#include "window_tools.h"
using namespace zen;
@@ -155,19 +155,16 @@ public:
int maxWidth = fastFromDIP(500);
int maxHeight = fastFromDIP(400); //try to determine better value based on actual display resolution:
-
if (parent)
- {
- const int disPos = wxDisplay::GetFromWindow(parent); //window must be visible
- if (disPos != wxNOT_FOUND)
+ if (const int disPos = wxDisplay::GetFromWindow(parent); //window must be visible
+ disPos != wxNOT_FOUND)
maxHeight = wxDisplay(disPos).GetClientArea().GetHeight() * 2 / 3;
- }
assert(!cfg.textMain.empty() || !cfg.textDetail.empty());
if (!cfg.textMain.empty())
{
setMainInstructionFont(*m_staticTextMain);
- m_staticTextMain->SetLabel(cfg.textMain);
+ m_staticTextMain->SetLabelText(cfg.textMain);
m_staticTextMain->Wrap(maxWidth); //call *after* SetLabel()
}
else
@@ -175,10 +172,7 @@ public:
if (!cfg.textDetail.empty())
{
- wxString text;
- if (!cfg.textMain.empty())
- text += L'\n';
- text += trimCpy(cfg.textDetail) + L'\n'; //add empty top/bottom lines *instead* of using border space!
+ const wxString& text = trimCpy(cfg.textDetail) + L'\n'; //add empty line *instead* of using border space!
setBestInitialSize(*m_richTextDetail, text, wxSize(maxWidth, maxHeight));
setTextWithUrls(*m_richTextDetail, text);
bgstack15