[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/graphics/kst/kst
From: Barth Netterfield <netterfield () astro ! utoronto ! ca>
Date: 2005-12-01 1:22:03
Message-ID: 1133400123.748310.29284.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 484490 by netterfield:
Margins!
M +7 -5 kstviewlabel.cpp
--- trunk/extragear/graphics/kst/kst/kstviewlabel.cpp #484489:484490
@@ -248,7 +248,7 @@
switch (hJust) {
case KST_JUSTIFY_H_RIGHT:
rc.x = -_textWidth / 2;
- tx = size().width() - int(_textWidth * abcos + _textHeight * absin) / 2 - \
borderWidth(); + tx = size().width() - int(_textWidth * abcos + _textHeight * \
absin) / 2 - borderWidth() - padding(); break;
case KST_JUSTIFY_H_CENTER:
rc.x = -_textWidth / 2;
@@ -259,14 +259,14 @@
case KST_JUSTIFY_H_LEFT:
default:
rc.x = -_textWidth / 2;
- tx = int(_textWidth * abcos + _textHeight * absin) / 2 + borderWidth();
+ tx = int(_textWidth * abcos + _textHeight * absin) / 2 + borderWidth() + \
padding(); break;
}
switch (KST_JUSTIFY_V(_justify)) {
case KST_JUSTIFY_V_BOTTOM:
rc.y = _ascent - _textHeight / 2;
- ty = size().height() - int(_textHeight * abcos + _textWidth * absin) / 2 - \
borderWidth(); + ty = size().height() - int(_textHeight * abcos + _textWidth * \
absin) / 2 - borderWidth() - padding(); break;
case KST_JUSTIFY_V_CENTER:
rc.y = _ascent - _textHeight / 2;
@@ -276,7 +276,7 @@
case KST_JUSTIFY_V_TOP:
default:
rc.y = _ascent - _textHeight / 2;
- ty = int(_textHeight * abcos + _textWidth * absin) / 2 + borderWidth();
+ ty = int(_textHeight * abcos + _textWidth * absin) / 2 + borderWidth() + \
padding(); break;
}
@@ -463,7 +463,7 @@
}
}
- resize(sz + QSize(borderWidth()*2, borderWidth()*2));
+ resize(sz + QSize((borderWidth()+padding())*2, (borderWidth()+padding())*2));
}
@@ -611,6 +611,7 @@
widget->_border->setValue(borderWidth());
widget->_boxColors->setForeground(borderColor());
widget->_boxColors->setBackground(backgroundColor());
+ widget->_margin->setValue(padding());
}
return true;
}
@@ -641,6 +642,7 @@
setBorderWidth(widget->_border->value());
setBorderColor(widget->_boxColors->foreground());
setBackgroundColor(widget->_boxColors->background());
+ setPadding(widget->_margin->value());
reparse(); // calls setDirty()
return true;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic