author | sandman <sandman> | 2002-09-27 00:54:58 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-09-27 00:54:58 (UTC) |
commit | dcd5eb6949787321c278b10772bd75a27ec6d508 (patch) (side-by-side diff) | |
tree | 12525523ac676e6b43419f742afb6b1d007d61da | |
parent | aec4806d28c0422e9d0572e9601d6dc41a9cdd61 (diff) | |
download | opie-dcd5eb6949787321c278b10772bd75a27ec6d508.zip opie-dcd5eb6949787321c278b10772bd75a27ec6d508.tar.gz opie-dcd5eb6949787321c278b10772bd75a27ec6d508.tar.bz2 |
- size tweak for OColorButton
- new convenience methods in OFontSelector
-rw-r--r-- | libopie/ocolorbutton.cpp | 5 | ||||
-rw-r--r-- | libopie/ofontselector.cpp | 5 | ||||
-rw-r--r-- | libopie/ofontselector.h | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/libopie/ocolorbutton.cpp b/libopie/ocolorbutton.cpp index 96e5612..4734c0c 100644 --- a/libopie/ocolorbutton.cpp +++ b/libopie/ocolorbutton.cpp @@ -51,7 +51,10 @@ OColorButton::OColorButton ( QWidget *parent, const char *name ) connect ( d-> m_menu, SIGNAL( colorSelected ( const QColor & )), this, SLOT( updateColor ( const QColor & ))); updateColor ( black ); - setMinimumSize ( sizeHint ( ) + QSize ( 8, 0 )); + + QSize s = sizeHint ( ) + QSize ( 12, 0 ); + setMinimumSize ( s ); + setMaximumSize ( s. width ( ) * 2, s. height ( )); } OColorButton::~OColorButton ( ) diff --git a/libopie/ofontselector.cpp b/libopie/ofontselector.cpp index d32aeb4..39440af 100644 --- a/libopie/ofontselector.cpp +++ b/libopie/ofontselector.cpp @@ -112,6 +112,11 @@ OFontSelector::~OFontSelector ( ) { } +bool OFontSelector::setSelectedFont ( const QFont &f ) +{ + return setSelectedFont ( f. family ( ), m_fdb. styleString ( f ), f. pointSize ( ), QFont::encodingName ( f. charSet ( ))); +} + bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & /*charset*/ ) { QString sizeStr = QString::number ( sizeVal ); diff --git a/libopie/ofontselector.h b/libopie/ofontselector.h index 2011e43..b3aa862 100644 --- a/libopie/ofontselector.h +++ b/libopie/ofontselector.h @@ -49,6 +49,7 @@ public: QFont selectedFont ( ); + bool setSelectedFont ( const QFont & ); bool setSelectedFont ( const QString &family, const QString &style, int size, const QString &charset = 0 ); QString fontFamily ( ) const; |