diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2021-04-08 14:13:16 +0300 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-04-09 17:45:33 +0900 |
commit | 5e0401f3a061324224ff3db4349f27cd41ee3a92 (patch) | |
tree | 0c1f211e721b97c73fe06d625a7551c49b24ff06 /src/komposetaskwidget.cpp | |
parent | 330e8eef47e1b7cd3aa43ec39f5e499ef69d9c3f (diff) | |
download | kompose-5e0401f3a061324224ff3db4349f27cd41ee3a92.tar.gz kompose-5e0401f3a061324224ff3db4349f27cd41ee3a92.zip |
Added window border styling options.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
(cherry picked from commit ac7c1af9b4425f5c51eafd449ec253189113a57e)
Diffstat (limited to 'src/komposetaskwidget.cpp')
-rw-r--r-- | src/komposetaskwidget.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/komposetaskwidget.cpp b/src/komposetaskwidget.cpp index 2d94343..d8f92f4 100644 --- a/src/komposetaskwidget.cpp +++ b/src/komposetaskwidget.cpp @@ -205,19 +205,26 @@ void KomposeTaskWidget::drawWidget() } // Border - if (!highlight) + TQColor borderColor; + int borderWidth, borderStyle; + + if (highlight) { - TQPen pen( gray, 1, TQt::SolidLine ); - p.setPen( pen ); - p.drawRect(rect()); + borderColor = KomposeSettings::instance()->getWindowBorderActiveColor(); + borderWidth = KomposeSettings::instance()->getWindowBorderActiveWidth(); + borderStyle = KomposeSettings::instance()->getWindowBorderActiveStyle(); } else { - TQPen pen( black, 2, TQt::DotLine ); - p.setPen( pen ); - p.drawRect( TQRect( 1, 1, rect().width()-1, rect().height()-1 ) ); + borderColor = KomposeSettings::instance()->getWindowBorderInactiveColor(); + borderWidth = KomposeSettings::instance()->getWindowBorderInactiveWidth(); + borderStyle = KomposeSettings::instance()->getWindowBorderInactiveStyle(); } + TQPen pen(borderColor, borderWidth, static_cast<TQt::PenStyle>(borderStyle)); + + p.setPen(pen); + p.drawRect(rect()); p.end(); } |