From 3abd781670e4cd7a82d5ab2966ef9f8131535b54 Mon Sep 17 00:00:00 2001 From: pescuma Date: Tue, 6 Jan 2009 05:45:37 +0000 Subject: 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 --- Plugins/skins/SkinLib/BorderState.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'Plugins/skins/SkinLib/BorderState.cpp') 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 #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 +} -- cgit v1.2.3