summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/layoutarray.cpp5
-rw-r--r--src/gui/widgets/popup.cpp6
-rw-r--r--src/gui/widgets/scrollarea.cpp6
-rw-r--r--src/gui/widgets/tabs/setup_input.cpp3
-rw-r--r--src/gui/widgets/textbox.cpp4
-rw-r--r--src/gui/widgets/window.cpp12
6 files changed, 24 insertions, 12 deletions
diff --git a/src/gui/widgets/layoutarray.cpp b/src/gui/widgets/layoutarray.cpp
index 46dd07085..a86d0111e 100644
--- a/src/gui/widgets/layoutarray.cpp
+++ b/src/gui/widgets/layoutarray.cpp
@@ -299,7 +299,10 @@ void LayoutArray::reflow(const int nx, const int ny,
[CAST_SIZE(gridX)];
if ((cell != nullptr) && cell->mType != LayoutCell::NONE)
{
- int dx = x, dy = y, dw = 0, dh = 0;
+ int dx = x;
+ int dy = y;
+ int dw = 0;
+ int dh = 0;
align(dx, dw, 0, *cell,
&widths[CAST_SIZE(gridX)], szW - gridX);
align(dy, dh, 1, *cell,
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index 4ae11bbd1..c676de26e 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -175,8 +175,10 @@ void Popup::setLocationRelativeTo(const Widget *const widget)
if (widget == nullptr)
return;
- int wx, wy;
- int x, y;
+ int wx;
+ int wy;
+ int x;
+ int y;
widget->getAbsolutePosition(wx, wy);
getAbsolutePosition(x, y);
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index 52372c385..cce45deee 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -1019,7 +1019,8 @@ Rect ScrollArea::getVerticalMarkerDimension()
if (!mVBarVisible)
return Rect(0, 0, 0, 0);
- int length, pos;
+ int length;
+ int pos;
int height;
const int h2 = mShowButtons
? mScrollbarWidth : mMarkerSize / 2;
@@ -1076,7 +1077,8 @@ Rect ScrollArea::getHorizontalMarkerDimension()
if (!mHBarVisible)
return Rect(0, 0, 0, 0);
- int length, pos;
+ int length;
+ int pos;
int width;
const int w2 = mShowButtons
? mScrollbarWidth : mMarkerSize / 2;
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp
index adf9245bf..49b31c5fe 100644
--- a/src/gui/widgets/tabs/setup_input.cpp
+++ b/src/gui/widgets/tabs/setup_input.cpp
@@ -151,7 +151,8 @@ Setup_Input::~Setup_Input()
void Setup_Input::apply()
{
keyUnresolved();
- InputActionT key1, key2;
+ InputActionT key1;
+ InputActionT key2;
if (inputManager.hasConflicts(key1, key2))
{
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index 905347f89..545f52fa3 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -554,9 +554,9 @@ void TextBox::setCaretRow(const int row)
unsigned int TextBox::getCaretPosition() const
{
- int pos = 0, row;
+ int pos = 0;
- for (row = 0; row < mCaretRow; row++)
+ for (int row = 0; row < mCaretRow; row++)
pos += CAST_S32(mTextRows[row].size());
return pos + mCaretColumn;
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 3df552404..f76c5fb9e 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -510,8 +510,10 @@ void Window::setLocationRelativeTo(const Widget *const widget)
if (widget == nullptr)
return;
- int wx, wy;
- int x, y;
+ int wx;
+ int wy;
+ int x;
+ int y;
widget->getAbsolutePosition(wx, wy);
getAbsolutePosition(x, y);
@@ -527,8 +529,10 @@ void Window::setLocationHorisontallyRelativeTo(const Widget *const widget)
if (widget == nullptr)
return;
- int wx, wy;
- int x, y;
+ int wx;
+ int wy;
+ int x;
+ int y;
widget->getAbsolutePosition(wx, wy);
getAbsolutePosition(x, y);