summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -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;