[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdeedu/kalzium/src
From: Carsten Niehaus <cniehaus () gmx ! de>
Date: 2005-08-02 16:15:19
Message-ID: 1122999319.664759.24440.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 442418 by cniehaus:
port the gradient to the new optimum-size stuff
M +6 -4 element.cpp
--- branches/KDE/3.5/kdeedu/kalzium/src/element.cpp #442417:442418
@@ -309,16 +309,18 @@
p->setPen( Qt::black );
QFont symbol_font = p->font();
- symbol_font.setPointSize( 18 );
QFont f = p->font();
- f.setPointSize( 9 );
-
+
+ f.setPointSize( KalziumUtils::maxSize(value, QRect( X,Y+ELEMENTSIZE-h_small, \
ELEMENTSIZE, h_small ),f, p ) ); p->setFont( f );
p->drawText( X,Y+ELEMENTSIZE-h_small , ELEMENTSIZE, h_small,Qt::AlignCenter, value \
);
+ const QRect rect = QRect( X,Y,ELEMENTSIZE-2,ELEMENTSIZE-10 );
+ int goodsize = KalziumUtils::maxSize( symbol(), rect, symbol_font, p );
+ symbol_font.setPointSize( goodsize );
p->setFont( symbol_font );
- p->drawText( X,Y, ELEMENTSIZE,ELEMENTSIZE,Qt::AlignCenter, symbol() );
+ p->drawText( X+1,Y+5, ELEMENTSIZE-2,ELEMENTSIZE-10,Qt::AlignCenter, symbol() );
//border
p->setPen( Qt::black );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic