summaryrefslogtreecommitdiff
authorsandman <sandman>2002-09-27 00:54:58 (UTC)
committer sandman <sandman>2002-09-27 00:54:58 (UTC)
commitdcd5eb6949787321c278b10772bd75a27ec6d508 (patch) (side-by-side diff)
tree12525523ac676e6b43419f742afb6b1d007d61da
parentaec4806d28c0422e9d0572e9601d6dc41a9cdd61 (diff)
downloadopie-dcd5eb6949787321c278b10772bd75a27ec6d508.zip
opie-dcd5eb6949787321c278b10772bd75a27ec6d508.tar.gz
opie-dcd5eb6949787321c278b10772bd75a27ec6d508.tar.bz2
- size tweak for OColorButton
- new convenience methods in OFontSelector
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/ocolorbutton.cpp5
-rw-r--r--libopie/ofontselector.cpp5
-rw-r--r--libopie/ofontselector.h1
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
@@ -53,3 +53,6 @@ OColorButton::OColorButton ( QWidget *parent, const char *name )
updateColor ( black );
- setMinimumSize ( sizeHint ( ) + QSize ( 8, 0 ));
+
+ QSize s = sizeHint ( ) + QSize ( 12, 0 );
+ setMinimumSize ( s );
+ setMaximumSize ( s. width ( ) * 2, s. height ( ));
}
diff --git a/libopie/ofontselector.cpp b/libopie/ofontselector.cpp
index d32aeb4..39440af 100644
--- a/libopie/ofontselector.cpp
+++ b/libopie/ofontselector.cpp
@@ -114,2 +114,7 @@ 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*/ )
diff --git a/libopie/ofontselector.h b/libopie/ofontselector.h
index 2011e43..b3aa862 100644
--- a/libopie/ofontselector.h
+++ b/libopie/ofontselector.h
@@ -51,2 +51,3 @@ public:
+ bool setSelectedFont ( const QFont & );
bool setSelectedFont ( const QString &family, const QString &style, int size, const QString &charset = 0 );