summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-17 17:58:54 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-17 17:58:54 +0300
commit00ec60c1c0c3db8e3602e85dd152106f59f0c0e2 (patch)
treed84f0e5ae25bd105eb61f1237f6e558a1c4eb63a /src
parentd00c2f2108b16cc3d074ed0e177f5d2fe2d0366f (diff)
downloadplus-00ec60c1c0c3db8e3602e85dd152106f59f0c0e2.tar.gz
plus-00ec60c1c0c3db8e3602e85dd152106f59f0c0e2.tar.bz2
plus-00ec60c1c0c3db8e3602e85dd152106f59f0c0e2.tar.xz
plus-00ec60c1c0c3db8e3602e85dd152106f59f0c0e2.zip
Use strong typed bool Move for move variable in window.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/window.cpp2
-rw-r--r--src/gui/widgets/window.h7
-rw-r--r--src/gui/windows/connectiondialog.cpp2
3 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 036f17688..55dfe166a 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -115,7 +115,7 @@ Window::Window(const std::string &caption,
mAlignment(Graphics::CENTER),
mPadding(2),
mTitleBarHeight(16),
- mMovable(true),
+ mMovable(Move_true),
mDragOffsetX(0),
mDragOffsetY(0),
mMoved(false),
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index 4fc38afa0..7aca70bd9 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -67,6 +67,7 @@
#define GUI_WIDGETS_WINDOW_H
#include "enums/simpletypes/modal.h"
+#include "enums/simpletypes/move.h"
#include "enums/resources/imageposition.h"
@@ -556,7 +557,7 @@ class Window notfinal : public BasicContainer2,
* @param movable True if the window should be movable, false otherwise.
* @see isMovable
*/
- void setMovable(bool movable)
+ void setMovable(Move movable)
{ mMovable = movable; }
/**
@@ -566,7 +567,7 @@ class Window notfinal : public BasicContainer2,
* @see setMovable
*/
bool isMovable() const
- { return mMovable; }
+ { return mMovable == Move_true; }
Rect getChildrenArea() override;
@@ -617,7 +618,7 @@ class Window notfinal : public BasicContainer2,
/**
* True if the window is movable, false otherwise.
*/
- bool mMovable;
+ Move mMovable;
/**
* Holds a drag offset as an x coordinate where the drag of the window
diff --git a/src/gui/windows/connectiondialog.cpp b/src/gui/windows/connectiondialog.cpp
index 290a1cefe..5b60ef6ef 100644
--- a/src/gui/windows/connectiondialog.cpp
+++ b/src/gui/windows/connectiondialog.cpp
@@ -42,7 +42,7 @@ ConnectionDialog::ConnectionDialog(const std::string &text,
mCancelState(cancelState)
{
mTitleBarHeight = 0;
- setMovable(false);
+ setMovable(Move_false);
setMinWidth(0);
ProgressIndicator *const progressIndicator = new ProgressIndicator(this);