summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore 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
@@ -48,13 +48,16 @@ OColorButton::OColorButton ( QWidget *parent, const char *name )
48 d-> m_menu = new ColorPopupMenu ( black, 0, 0 ); 48 d-> m_menu = new ColorPopupMenu ( black, 0, 0 );
49 setPopup ( d-> m_menu ); 49 setPopup ( d-> m_menu );
50 //setPopupDelay ( 0 ); 50 //setPopupDelay ( 0 );
51 connect ( d-> m_menu, SIGNAL( colorSelected ( const QColor & )), this, SLOT( updateColor ( const QColor & ))); 51 connect ( d-> m_menu, SIGNAL( colorSelected ( const QColor & )), this, SLOT( updateColor ( const QColor & )));
52 52
53 updateColor ( black ); 53 updateColor ( black );
54 setMinimumSize ( sizeHint ( ) + QSize ( 8, 0 )); 54
55 QSize s = sizeHint ( ) + QSize ( 12, 0 );
56 setMinimumSize ( s );
57 setMaximumSize ( s. width ( ) * 2, s. height ( ));
55} 58}
56 59
57OColorButton::~OColorButton ( ) 60OColorButton::~OColorButton ( )
58{ 61{
59 delete d; 62 delete d;
60} 63}
diff --git a/libopie/ofontselector.cpp b/libopie/ofontselector.cpp
index d32aeb4..39440af 100644
--- a/libopie/ofontselector.cpp
+++ b/libopie/ofontselector.cpp
@@ -109,12 +109,17 @@ OFontSelector::OFontSelector ( QWidget *parent, const char *name, WFlags fl ) :
109} 109}
110 110
111OFontSelector::~OFontSelector ( ) 111OFontSelector::~OFontSelector ( )
112{ 112{
113} 113}
114 114
115bool OFontSelector::setSelectedFont ( const QFont &f )
116{
117 return setSelectedFont ( f. family ( ), m_fdb. styleString ( f ), f. pointSize ( ), QFont::encodingName ( f. charSet ( )));
118}
119
115bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & /*charset*/ ) 120bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & /*charset*/ )
116{ 121{
117 QString sizeStr = QString::number ( sizeVal ); 122 QString sizeStr = QString::number ( sizeVal );
118 123
119 QListBoxItem *family = m_font_family_list-> findItem ( familyStr ); 124 QListBoxItem *family = m_font_family_list-> findItem ( familyStr );
120 if ( !family ) 125 if ( !family )
diff --git a/libopie/ofontselector.h b/libopie/ofontselector.h
index 2011e43..b3aa862 100644
--- a/libopie/ofontselector.h
+++ b/libopie/ofontselector.h
@@ -46,12 +46,13 @@ public:
46 46
47 bool selectedFont ( QString &family, QString &style, int &size ); 47 bool selectedFont ( QString &family, QString &style, int &size );
48 bool selectedFont ( QString &family, QString &style, int &size, QString &charset ); 48 bool selectedFont ( QString &family, QString &style, int &size, QString &charset );
49 49
50 QFont selectedFont ( ); 50 QFont selectedFont ( );
51 51
52 bool setSelectedFont ( const QFont & );
52 bool setSelectedFont ( const QString &family, const QString &style, int size, const QString &charset = 0 ); 53 bool setSelectedFont ( const QString &family, const QString &style, int size, const QString &charset = 0 );
53 54
54 QString fontFamily ( ) const; 55 QString fontFamily ( ) const;
55 QString fontStyle ( ) const; 56 QString fontStyle ( ) const;
56 int fontSize ( ) const; 57 int fontSize ( ) const;
57 QString fontCharSet ( ) const; 58 QString fontCharSet ( ) const;