summaryrefslogtreecommitdiff
path: root/wx+/popup_dlg.cpp
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-01-04 10:50:14 -0500
committerB. Stack <bgstack15@gmail.com>2022-01-04 10:50:14 -0500
commit75bc2e56125125511a0505718dcb2c3d4150a933 (patch)
treeb8252ff8a09d9143ed2dc299d082f9d86535c1a2 /wx+/popup_dlg.cpp
parentMerge branch 'b11.15' into 'master' (diff)
downloadFreeFileSync-75bc2e56125125511a0505718dcb2c3d4150a933.tar.gz
FreeFileSync-75bc2e56125125511a0505718dcb2c3d4150a933.tar.bz2
FreeFileSync-75bc2e56125125511a0505718dcb2c3d4150a933.zip
add upstream 11.16
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