From 6998c0e5852e57d016298d1d701a6a9a92123bc5 Mon Sep 17 00:00:00 2001 From: Syarif Fakhri Date: Thu, 15 Sep 2022 09:43:15 +0800 Subject: [PATCH] double -> float --- src/DockWidget.cpp | 4 ++-- src/DockWidget.h | 4 ++-- src/OverlayDockContainer.cpp | 4 ++-- src/OverlayDockContainer.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/DockWidget.cpp b/src/DockWidget.cpp index 05d0335..5e9e2e5 100644 --- a/src/DockWidget.cpp +++ b/src/DockWidget.cpp @@ -1137,14 +1137,14 @@ bool CDockWidget::isCurrentTab() const //============================================================================ -void CDockWidget::setDefaultOverlayDockProportion(double Proportion) +void CDockWidget::setDefaultOverlayDockProportion(float Proportion) { d->DefaultOverlayDockProportion = Proportion; } //============================================================================ -double CDockWidget::DefaultOverlayDockProportion() const +float CDockWidget::DefaultOverlayDockProportion() const { return d->DefaultOverlayDockProportion; } diff --git a/src/DockWidget.h b/src/DockWidget.h index f63cf3c..08454f3 100644 --- a/src/DockWidget.h +++ b/src/DockWidget.h @@ -527,13 +527,13 @@ public: * Set default dock proportion when overlayed * see *DefaultOverlayDockProportion() */ - void setDefaultOverlayDockProportion(double Proportion); + void setDefaultOverlayDockProportion(float Proportion); /* * Set default dock proportion when overlayed * 0.25 is a quarter of the size, 0.5 is half the size, 1 is the entire size */ - double DefaultOverlayDockProportion() const; + float DefaultOverlayDockProportion() const; /* * Set overlay insertion mode diff --git a/src/OverlayDockContainer.cpp b/src/OverlayDockContainer.cpp index e78e2b0..1bee55d 100644 --- a/src/OverlayDockContainer.cpp +++ b/src/OverlayDockContainer.cpp @@ -244,7 +244,7 @@ void COverlayDockContainer::addDockWidget(CDockWidget* DockWidget) //============================================================================ -void COverlayDockContainer::setDockSizeProportion(double SplitterProportion) +void COverlayDockContainer::setDockSizeProportion(float SplitterProportion) { if (SplitterProportion < 0 || SplitterProportion > 1) { @@ -252,7 +252,7 @@ void COverlayDockContainer::setDockSizeProportion(double SplitterProportion) return; } - const auto dockSize = static_cast(static_cast(INT_MAX) * SplitterProportion); + const auto dockSize = static_cast(static_cast(INT_MAX) * SplitterProportion); const auto remainingSize = INT_MAX - dockSize; switch (d->Area) { diff --git a/src/OverlayDockContainer.h b/src/OverlayDockContainer.h index 175a1b8..a93f8ab 100644 --- a/src/OverlayDockContainer.h +++ b/src/OverlayDockContainer.h @@ -101,7 +101,7 @@ public: * Takes a float between 0 and 1 * E.g. 0.25 is a quarter of the size, 0.5 is half the size and 1 is the entire size of the container */ - void setDockSizeProportion(double SplitterProportion = 0.25); + void setDockSizeProportion(float SplitterProportion = 0.25); /** * Returns the side tab bar area of this overlay dock container