summaryrefslogtreecommitdiff
path: root/Plugins/skins/SkinLib/BorderState.cpp
diff options
context:
space:
mode:
authorpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-01-06 05:45:37 +0000
committerpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-01-06 05:45:37 +0000
commit3abd781670e4cd7a82d5ab2966ef9f8131535b54 (patch)
tree85cc3fcad80d491c706d77ed7a399cc17349dc6f /Plugins/skins/SkinLib/BorderState.cpp
parent30f9565911217d38cefda3920f55d183d8f6e219 (diff)
skins:
Added border to fields State is now got through interface It works! git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@124 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/skins/SkinLib/BorderState.cpp')
-rw-r--r--Plugins/skins/SkinLib/BorderState.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/Plugins/skins/SkinLib/BorderState.cpp b/Plugins/skins/SkinLib/BorderState.cpp
index ff5d046..83dcdbc 100644
--- a/Plugins/skins/SkinLib/BorderState.cpp
+++ b/Plugins/skins/SkinLib/BorderState.cpp
@@ -1,8 +1,9 @@
#include "globals.h"
+#include <windows.h>
#include "BorderState.h"
-BorderState::BorderState(int aLeft, int aRight, int aTop, int aBottom) : left(aLeft), right(aRight),
- top(aTop), bottom(aBottom)
+BorderState::BorderState(int aLeft, int aRight, int aTop, int aBottom)
+ : left(aLeft), right(aRight), top(aTop), bottom(aBottom)
{
}
@@ -17,7 +18,7 @@ int BorderState::getLeft() const
void BorderState::setLeft(int left)
{
- this->left = left;
+ this->left = max(0, left);
}
int BorderState::getRight() const
@@ -27,7 +28,7 @@ int BorderState::getRight() const
void BorderState::setRight(int right)
{
- this->right = right;
+ this->right = max(0, right);
}
int BorderState::getTop() const
@@ -37,7 +38,7 @@ int BorderState::getTop() const
void BorderState::setTop(int top)
{
- this->top = top;
+ this->top = max(0, top);
}
int BorderState::getBottom() const
@@ -47,13 +48,14 @@ int BorderState::getBottom() const
void BorderState::setBottom(int bottom)
{
- this->bottom = bottom;
+ this->bottom = max(0, bottom);
}
void BorderState::setAll(int border)
{
+ border = max(0, border);
left = border;
right = border;
top = border;
bottom = border;
-} \ No newline at end of file
+}