comparison ui/textoverlaybutton.cpp @ 734:f6796ff72b65

Only show overlay if it is not "0"
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 03 Jul 2014 16:28:35 +0200
parents 0bb54205c55a
children c92eb6298dd7
comparison
equal deleted inserted replaced
733:d15ccbaa119e 734:f6796ff72b65
16 #include "textoverlaybutton.h" 16 #include "textoverlaybutton.h"
17 17
18 void TextOverlayButton::paintEvent(QPaintEvent *e) 18 void TextOverlayButton::paintEvent(QPaintEvent *e)
19 { 19 {
20 QToolButton::paintEvent(e); 20 QToolButton::paintEvent(e);
21 if (mOverlay == "0") {
22 return;
23 }
21 QPainter painter(this); 24 QPainter painter(this);
22 QRect myRect = e->rect().translated(26, -29); 25 QRect myRect = e->rect().translated(26, -29);
23 26
24 // circle 27 // circle
25 QLinearGradient gradient(myRect.topLeft(), 28 QLinearGradient gradient(myRect.topLeft(),

http://wald.intevation.org/projects/trustbridge/