double -> float

This commit is contained in:
Syarif Fakhri 2022-09-15 09:43:15 +08:00
parent 4d3328e468
commit 6998c0e585
4 changed files with 7 additions and 7 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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<int>(static_cast<double>(INT_MAX) * SplitterProportion);
const auto dockSize = static_cast<int>(static_cast<float>(INT_MAX) * SplitterProportion);
const auto remainingSize = INT_MAX - dockSize;
switch (d->Area)
{

View File

@ -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