added button-size dependent hard-coded icon scale (for drawing window icon in title bar)
svn path=/trunk/KDE/kdebase/workspace/; revision=1016856
This commit is contained in:
parent
66c1892947
commit
f17068e815
2 changed files with 18 additions and 0 deletions
|
@ -193,6 +193,20 @@ namespace Nitrogen
|
|||
else return NitrogenConfiguration().buttonSize();
|
||||
}
|
||||
|
||||
//__________________________________________________
|
||||
int NitrogenConfiguration::iconScale( ButtonSize value )
|
||||
{
|
||||
switch( value )
|
||||
{
|
||||
case ButtonSmall: return 13;
|
||||
case ButtonDefault: return 16;
|
||||
case ButtonLarge: return 24;
|
||||
case ButtonHuge: return 35;
|
||||
default: return NitrogenConfiguration().iconScale();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//__________________________________________________
|
||||
QString NitrogenConfiguration::buttonTypeName( ButtonType value, bool translated )
|
||||
{
|
||||
|
|
|
@ -135,10 +135,14 @@ namespace Nitrogen
|
|||
|
||||
static QString buttonSizeName( ButtonSize, bool translated );
|
||||
static ButtonSize buttonSize( QString, bool translated );
|
||||
static int iconScale( ButtonSize );
|
||||
|
||||
virtual ButtonSize buttonSize( void ) const
|
||||
{ return buttonSize_; }
|
||||
|
||||
virtual int iconScale( void ) const
|
||||
{ return iconScale( buttonSize() ); }
|
||||
|
||||
virtual QString buttonSizeName( bool translated ) const
|
||||
{ return buttonSizeName( buttonSize(), translated ); }
|
||||
|
||||
|
|
Loading…
Reference in a new issue