summaryrefslogtreecommitdiff
path: root/wx+
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2019-05-12 22:44:22 +0000
committerDaniel Wilhelm <shieldwed@outlook.com>2019-05-12 22:44:22 +0000
commit2cb4599782d970f386a67dfd4f4dab0d531d4348 (patch)
treeb873b15f50a981aacf8bb49fd646bfded2e7a73b /wx+
parentMerge branch '10.11' into 'master' (diff)
parent10.12 (diff)
downloadFreeFileSync-2cb4599782d970f386a67dfd4f4dab0d531d4348.tar.gz
FreeFileSync-2cb4599782d970f386a67dfd4f4dab0d531d4348.tar.bz2
FreeFileSync-2cb4599782d970f386a67dfd4f4dab0d531d4348.zip
Merge branch '10.12' into 'master'10.12
10.12 See merge request opensource-tracking/FreeFileSync!9
Diffstat (limited to 'wx+')
-rw-r--r--wx+/graph.cpp10
-rw-r--r--wx+/grid.cpp7
-rw-r--r--wx+/popup_dlg.h2
-rw-r--r--wx+/tooltip.cpp2
4 files changed, 12 insertions, 9 deletions
diff --git a/wx+/graph.cpp b/wx+/graph.cpp
index 9cacd1bf..3df8888a 100644
--- a/wx+/graph.cpp
+++ b/wx+/graph.cpp
@@ -621,10 +621,10 @@ void Graph2D::render(wxDC& dc) const
maxX = std::max(maxX, rangeX.second);
}
- const wxSize minimalBlockSizePx = dc.GetTextExtent(L"00");
-
if (minX <= maxX && maxX - minX < std::numeric_limits<double>::infinity()) //valid x-range
{
+ const wxSize minimalBlockSizePx = dc.GetTextExtent(L"00");
+
int blockCountX = 0;
//enlarge minX, maxX to a multiple of a "useful" block size
if (attr_.labelposX != LABEL_X_NONE && attr_.labelFmtX.get())
@@ -675,7 +675,9 @@ void Graph2D::render(wxDC& dc) const
minimalBlockSizePx.GetHeight() * 3,
*attr_.labelFmtY);
- if (graphArea.width <= 1 || graphArea.height <= 1) return;
+ if (graphArea.width <= 1 || graphArea.height <= 1)
+ return;
+
const ConvertCoord cvrtX(minX, maxX, graphArea.width - 1); //map [minX, maxX] to [0, pixelWidth - 1]
const ConvertCoord cvrtY(maxY, minY, graphArea.height - 1); //map [minY, maxY] to [pixelHeight - 1, 0]
@@ -710,7 +712,7 @@ void Graph2D::render(wxDC& dc) const
}
//update active mouse selection
- if (activeSel_.get() && graphArea.width > 0 && graphArea.height > 0)
+ if (activeSel_)
{
auto widen = [](double* low, double* high)
{
diff --git a/wx+/grid.cpp b/wx+/grid.cpp
index 114bb82d..2838f575 100644
--- a/wx+/grid.cpp
+++ b/wx+/grid.cpp
@@ -1177,9 +1177,10 @@ private:
int pixelsPerUnitY = 0;
wnd_.refParent().GetScrollPixelsPerUnit(nullptr, &pixelsPerUnitY);
- if (pixelsPerUnitY <= 0) return;
+ if (pixelsPerUnitY <= 0)
+ return;
- const double mouseDragSpeedIncScrollU = pixelsPerUnitY > 0 ? MOUSE_DRAG_ACCELERATION_DIP * wnd_.rowLabelWin_.getRowHeight() / pixelsPerUnitY : 0; //unit: [scroll units / (DIP * sec)]
+ const double mouseDragSpeedIncScrollU = MOUSE_DRAG_ACCELERATION_DIP * wnd_.rowLabelWin_.getRowHeight() / pixelsPerUnitY; //unit: [scroll units / (DIP * sec)]
auto autoScroll = [&](int overlapPix, double& toScroll)
{
@@ -1797,7 +1798,7 @@ void Grid::setColumnConfig(const std::vector<Grid::ColAttributes>& attr)
}
//"ownership" of visible columns is now within Grid
- visibleCols_ = visCols;
+ visibleCols_ = std::move(visCols);
updateWindowSizes();
Refresh();
diff --git a/wx+/popup_dlg.h b/wx+/popup_dlg.h
index 2aedf9b8..0acd2a95 100644
--- a/wx+/popup_dlg.h
+++ b/wx+/popup_dlg.h
@@ -15,7 +15,7 @@
namespace zen
{
//parent window, optional: support correct dialog placement above parent on multiple monitor systems
-//this module requires error, warning and info image files in resources.zip, see <wx+/image_resources.h>
+//this module requires error, warning and info image files in Icons.zip, see <wx+/image_resources.h>
struct PopupDialogCfg;
diff --git a/wx+/tooltip.cpp b/wx+/tooltip.cpp
index 03025049..142c9b7f 100644
--- a/wx+/tooltip.cpp
+++ b/wx+/tooltip.cpp
@@ -31,7 +31,7 @@ public:
//Suse Linux/X11: needs parent window, else there are z-order issues
SetSizeHints(wxDefaultSize, wxDefaultSize);
- SetExtraStyle(this->GetExtraStyle() | wxWS_EX_TRANSIENT);
+ SetExtraStyle(this->GetExtraStyle() | wxWS_EX_TRANSIENT);
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK)); //both required: on Ubuntu background is black, foreground white!
SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT)); //
bgstack15