-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | inputmethods/dvorak/dvorak.cpp | 13 | ||||
-rw-r--r-- | inputmethods/keyboard/keyboard.cpp | 13 | ||||
-rw-r--r-- | inputmethods/multikey/keyboard.cpp | 6 | ||||
-rw-r--r-- | inputmethods/pickboard/pickboard.cpp | 15 | ||||
-rw-r--r-- | inputmethods/unikeyboard/unikeyboard.cpp | 12 |
6 files changed, 45 insertions, 17 deletions
@@ -1,20 +1,21 @@ | |||
1 | 2005-??-??Opie 1.2.0 | 1 | 2005-??-??Opie 1.2.0 |
2 | 2 | ||
3 | New Features | 3 | New Features |
4 | ------------ | 4 | ------------ |
5 | 5 | ||
6 | Fixed Bugs | 6 | Fixed Bugs |
7 | ---------- | 7 | ---------- |
8 | * #1501 - Fixing bug in todo sql backend (eilers) | 8 | * #1501 - Fixed bug in todo sql backend (eilers) |
9 | * n.a - Removed hard coded font sizes in a couple of inputmethods (mickeyl) | ||
9 | 10 | ||
10 | Internal | 11 | Internal |
11 | -------- | 12 | -------- |
12 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) | 13 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) |
13 | 14 | ||
14 | 2004-11-26Opie 1.1.8 | 15 | 2004-11-26Opie 1.1.8 |
15 | 16 | ||
16 | New Features | 17 | New Features |
17 | ------------ | 18 | ------------ |
18 | * PackageManager supports installation of local ipkg files (drw) | 19 | * PackageManager supports installation of local ipkg files (drw) |
19 | * PackageManager supports linking of applications to root (drw) | 20 | * PackageManager supports linking of applications to root (drw) |
20 | * PackageManager supports src/gz feeds (drw,wimpie) | 21 | * PackageManager supports src/gz feeds (drw,wimpie) |
diff --git a/inputmethods/dvorak/dvorak.cpp b/inputmethods/dvorak/dvorak.cpp index 2137f22..3781e38 100644 --- a/inputmethods/dvorak/dvorak.cpp +++ b/inputmethods/dvorak/dvorak.cpp | |||
@@ -12,49 +12,56 @@ | |||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "dvorak.h" | 21 | #include "dvorak.h" |
22 | 22 | ||
23 | #include <qpe/global.h> | 23 | #include <qpe/global.h> |
24 | 24 | #include <qpe/config.h> | |
25 | #include <qwindowsystem_qws.h> | 25 | #include <qwindowsystem_qws.h> |
26 | #include <qpainter.h> | 26 | #include <qpainter.h> |
27 | #include <qfontmetrics.h> | 27 | #include <qfontmetrics.h> |
28 | #include <qtimer.h> | 28 | #include <qtimer.h> |
29 | #include <ctype.h> | 29 | #include <ctype.h> |
30 | 30 | ||
31 | 31 | ||
32 | #define USE_SMALL_BACKSPACE | 32 | #define USE_SMALL_BACKSPACE |
33 | 33 | ||
34 | using namespace Dvorak; | 34 | using namespace Dvorak; |
35 | 35 | ||
36 | Keyboard::Keyboard(QWidget* parent, const char* name, WFlags f) : | 36 | Keyboard::Keyboard(QWidget* parent, const char* name, WFlags f) : |
37 | QFrame(parent, name, f), shift(FALSE), lock(FALSE), ctrl(FALSE), | 37 | QFrame(parent, name, f), shift(FALSE), lock(FALSE), ctrl(FALSE), |
38 | alt(FALSE), useLargeKeys(TRUE), useOptiKeys(0), pressedKey(-1), | 38 | alt(FALSE), useLargeKeys(TRUE), useOptiKeys(0), pressedKey(-1), |
39 | unicode(-1), qkeycode(0), modifiers(0) | 39 | unicode(-1), qkeycode(0), modifiers(0) |
40 | { | 40 | { |
41 | // setPalette(QPalette(QColor(240,240,230))); // Beige! | 41 | // setPalette(QPalette(QColor(240,240,230))); // Beige! |
42 | // setFont( QFont( "Helvetica", 8 ) ); | 42 | // setFont( QFont( "Helvetica", 8 ) ); |
43 | // setPalette(QPalette(QColor(200,200,200))); // Gray | 43 | // setPalette(QPalette(QColor(200,200,200))); // Gray |
44 | setPalette(QPalette(QColor(220,220,220))); // Gray | 44 | setPalette(QPalette(QColor(220,220,220))); // Gray |
45 | 45 | ||
46 | // get the default font | ||
47 | Config *config = new Config( "qpe" ); | ||
48 | config->setGroup( "Appearance" ); | ||
49 | QString familyStr = config->readEntry( "FontFamily", "smallsmooth" ); | ||
50 | int fontSize = config->readNumEntry( "FontSize", 10 ); | ||
51 | delete config; | ||
52 | |||
46 | picks = new KeyboardPicks( this ); | 53 | picks = new KeyboardPicks( this ); |
47 | picks->setFont( QFont( "smallsmooth", 9 ) ); | 54 | picks->setFont( QFont( familyStr, fontSize ) ); |
48 | setFont( QFont( "smallsmooth", 9 ) ); | 55 | setFont( QFont( familyStr, fontSize ) ); |
49 | picks->initialise(); | 56 | picks->initialise(); |
50 | QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), | 57 | QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), |
51 | this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); | 58 | this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); |
52 | 59 | ||
53 | repeatTimer = new QTimer( this ); | 60 | repeatTimer = new QTimer( this ); |
54 | connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) ); | 61 | connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) ); |
55 | } | 62 | } |
56 | 63 | ||
57 | void Keyboard::resizeEvent(QResizeEvent*) | 64 | void Keyboard::resizeEvent(QResizeEvent*) |
58 | { | 65 | { |
59 | int ph = picks->sizeHint().height(); | 66 | int ph = picks->sizeHint().height(); |
60 | picks->setGeometry( 0, 0, width(), ph ); | 67 | picks->setGeometry( 0, 0, width(), ph ); |
diff --git a/inputmethods/keyboard/keyboard.cpp b/inputmethods/keyboard/keyboard.cpp index fb88f2a..39d44cd 100644 --- a/inputmethods/keyboard/keyboard.cpp +++ b/inputmethods/keyboard/keyboard.cpp | |||
@@ -12,50 +12,57 @@ | |||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "keyboard.h" | 21 | #include "keyboard.h" |
22 | 22 | ||
23 | #include <qpe/global.h> | 23 | #include <qpe/global.h> |
24 | 24 | #include <qpe/config.h> | |
25 | #include <qwindowsystem_qws.h> | 25 | #include <qwindowsystem_qws.h> |
26 | #include <qpainter.h> | 26 | #include <qpainter.h> |
27 | #include <qfontmetrics.h> | 27 | #include <qfontmetrics.h> |
28 | #include <qtimer.h> | 28 | #include <qtimer.h> |
29 | #include <ctype.h> | 29 | #include <ctype.h> |
30 | 30 | ||
31 | #include <sys/utsname.h> | 31 | #include <sys/utsname.h> |
32 | 32 | ||
33 | using namespace KeyboardInput; | 33 | using namespace KeyboardInput; |
34 | 34 | ||
35 | #define USE_SMALL_BACKSPACE | 35 | #define USE_SMALL_BACKSPACE |
36 | 36 | ||
37 | Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) : | 37 | Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) : |
38 | QFrame(parent, _name, f), shift(FALSE), lock(FALSE), ctrl(FALSE), | 38 | QFrame(parent, _name, f), shift(FALSE), lock(FALSE), ctrl(FALSE), |
39 | alt(FALSE), useLargeKeys(TRUE), useOptiKeys(0), pressedKey(-1), | 39 | alt(FALSE), useLargeKeys(TRUE), useOptiKeys(0), pressedKey(-1), |
40 | unicode(-1), qkeycode(0), modifiers(0) | 40 | unicode(-1), qkeycode(0), modifiers(0) |
41 | { | 41 | { |
42 | // setPalette(QPalette(QColor(240,240,230))); // Beige! | 42 | // setPalette(QPalette(QColor(240,240,230))); // Beige! |
43 | // setFont( QFont( "Helvetica", 8 ) ); | 43 | // setFont( QFont( "Helvetica", 8 ) ); |
44 | // setPalette(QPalette(QColor(200,200,200))); // Gray | 44 | // setPalette(QPalette(QColor(200,200,200))); // Gray |
45 | setPalette(QPalette(QColor(220,220,220))); // Gray | 45 | setPalette(QPalette(QColor(220,220,220))); // Gray |
46 | 46 | ||
47 | // get the default font | ||
48 | Config *config = new Config( "qpe" ); | ||
49 | config->setGroup( "Appearance" ); | ||
50 | QString familyStr = config->readEntry( "FontFamily", "smallsmooth" ); | ||
51 | int fontSize = config->readNumEntry( "FontSize", 10 ); | ||
52 | delete config; | ||
53 | |||
47 | picks = new KeyboardPicks( this ); | 54 | picks = new KeyboardPicks( this ); |
48 | picks->setFont( QFont( "smallsmooth", 9 ) ); | 55 | picks->setFont( QFont( familyStr, fontSize ) ); |
49 | setFont( QFont( "smallsmooth", 9 ) ); | 56 | setFont( QFont( familyStr, fontSize ) ); |
50 | picks->initialise(); | 57 | picks->initialise(); |
51 | QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), | 58 | QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), |
52 | this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); | 59 | this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); |
53 | 60 | ||
54 | repeatTimer = new QTimer( this ); | 61 | repeatTimer = new QTimer( this ); |
55 | 62 | ||
56 | // temporary quick and dirty fix for the "sticky keyboard bug" | 63 | // temporary quick and dirty fix for the "sticky keyboard bug" |
57 | // on ipaq. | 64 | // on ipaq. |
58 | // struct utsname name; | 65 | // struct utsname name; |
59 | // if (uname(&name) != -1) | 66 | // if (uname(&name) != -1) |
60 | // { | 67 | // { |
61 | //QString release=name.release; | 68 | //QString release=name.release; |
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp index f8cafd5..96fb484 100644 --- a/inputmethods/multikey/keyboard.cpp +++ b/inputmethods/multikey/keyboard.cpp | |||
@@ -57,37 +57,37 @@ Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) : | |||
57 | meta(0), circumflex(0), diaeresis(0), baccent(0), accent(0), | 57 | meta(0), circumflex(0), diaeresis(0), baccent(0), accent(0), |
58 | useLargeKeys(TRUE), usePicks(0), useRepeat(0), | 58 | useLargeKeys(TRUE), usePicks(0), useRepeat(0), |
59 | pressedKeyRow(-1), pressedKeyCol(-1), | 59 | pressedKeyRow(-1), pressedKeyCol(-1), |
60 | unicode(-1), qkeycode(0), modifiers(0), schar(0), mchar(0), echar(0), | 60 | unicode(-1), qkeycode(0), modifiers(0), schar(0), mchar(0), echar(0), |
61 | configdlg(0) | 61 | configdlg(0) |
62 | 62 | ||
63 | { | 63 | { |
64 | 64 | ||
65 | // get the default font | 65 | // get the default font |
66 | Config *config = new Config( "qpe" ); | 66 | Config *config = new Config( "qpe" ); |
67 | config->setGroup( "Appearance" ); | 67 | config->setGroup( "Appearance" ); |
68 | QString familyStr = config->readEntry( "FontFamily", "smallsmooth" ); | 68 | QString familyStr = config->readEntry( "FontFamily", "smallsmooth" ); |
69 | int fontSize = config->readNumEntry( "FontSize", 10 ); | ||
69 | delete config; | 70 | delete config; |
70 | 71 | ||
71 | config = new Config("multikey"); | 72 | config = new Config("multikey"); |
72 | config->setGroup ("general"); | 73 | config->setGroup ("general"); |
73 | usePicks = config->readBoolEntry ("usePickboard", 0); // default closed | 74 | usePicks = config->readBoolEntry ("usePickboard", 0); // default closed |
74 | useRepeat = config->readBoolEntry ("useRepeat", 1); | 75 | useRepeat = config->readBoolEntry ("useRepeat", 1); |
75 | delete config; | 76 | delete config; |
76 | 77 | ||
77 | 78 | setFont( QFont( familyStr, fontSize ) ); | |
78 | setFont( QFont( familyStr, 10 ) ); | ||
79 | 79 | ||
80 | picks = new KeyboardPicks( this ); | 80 | picks = new KeyboardPicks( this ); |
81 | picks->setFont( QFont( familyStr, 10 ) ); | 81 | picks->setFont( QFont( familyStr, fontSize ) ); |
82 | picks->initialise(); | 82 | picks->initialise(); |
83 | if (usePicks) { | 83 | if (usePicks) { |
84 | 84 | ||
85 | QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), | 85 | QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), |
86 | this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); | 86 | this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); |
87 | 87 | ||
88 | } else picks->hide(); | 88 | } else picks->hide(); |
89 | 89 | ||
90 | loadKeyboardColors(); | 90 | loadKeyboardColors(); |
91 | 91 | ||
92 | keys = new Keys(); | 92 | keys = new Keys(); |
93 | 93 | ||
diff --git a/inputmethods/pickboard/pickboard.cpp b/inputmethods/pickboard/pickboard.cpp index 1611cb0..e5365ba 100644 --- a/inputmethods/pickboard/pickboard.cpp +++ b/inputmethods/pickboard/pickboard.cpp | |||
@@ -13,25 +13,25 @@ | |||
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "pickboard.h" | 20 | #include "pickboard.h" |
21 | #include "pickboardpicks.h" | 21 | #include "pickboardpicks.h" |
22 | #include "pickboardcfg.h" | 22 | #include "pickboardcfg.h" |
23 | 23 | ||
24 | #include <qpe/global.h> | 24 | #include <qpe/global.h> |
25 | 25 | #include <qpe/config.h> | |
26 | #include <qpainter.h> | 26 | #include <qpainter.h> |
27 | #include <qlist.h> | 27 | #include <qlist.h> |
28 | #include <qbitmap.h> | 28 | #include <qbitmap.h> |
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | #include <qvbox.h> | 30 | #include <qvbox.h> |
31 | #include <qdialog.h> | 31 | #include <qdialog.h> |
32 | #include <qscrollview.h> | 32 | #include <qscrollview.h> |
33 | #include <qpopupmenu.h> | 33 | #include <qpopupmenu.h> |
34 | #include <qhbuttongroup.h> | 34 | #include <qhbuttongroup.h> |
35 | #include <qpushbutton.h> | 35 | #include <qpushbutton.h> |
36 | #include <qmessagebox.h> | 36 | #include <qmessagebox.h> |
37 | #ifdef QWS | 37 | #ifdef QWS |
@@ -83,28 +83,33 @@ public: | |||
83 | parent,SIGNAL(key(ushort,ushort,ushort,bool,bool))); | 83 | parent,SIGNAL(key(ushort,ushort,ushort,bool,bool))); |
84 | } | 84 | } |
85 | 85 | ||
86 | PickboardPicks* picks; | 86 | PickboardPicks* picks; |
87 | QPushButton* menu; | 87 | QPushButton* menu; |
88 | }; | 88 | }; |
89 | 89 | ||
90 | Pickboard::Pickboard(QWidget* parent, const char* name, WFlags f) : | 90 | Pickboard::Pickboard(QWidget* parent, const char* name, WFlags f) : |
91 | QFrame(parent,name,f) | 91 | QFrame(parent,name,f) |
92 | { | 92 | { |
93 | (new QHBoxLayout(this))->setAutoAdd(TRUE); | 93 | (new QHBoxLayout(this))->setAutoAdd(TRUE); |
94 | d = new PickboardPrivate(this); | 94 | d = new PickboardPrivate(this); |
95 | // under Win32 we may not have smallsmooth font | 95 | |
96 | #ifndef Q_OS_WIN32 | 96 | // get the default font |
97 | setFont( QFont( "smallsmooth", 9 ) ); | 97 | Config *config = new Config( "qpe" ); |
98 | #endif | 98 | config->setGroup( "Appearance" ); |
99 | QString familyStr = config->readEntry( "FontFamily", "smallsmooth" ); | ||
100 | int fontSize = config->readNumEntry( "FontSize", 10 ); | ||
101 | delete config; | ||
102 | |||
103 | setFont( QFont( familyStr, fontSize ) ); | ||
99 | } | 104 | } |
100 | 105 | ||
101 | Pickboard::~Pickboard() | 106 | Pickboard::~Pickboard() |
102 | { | 107 | { |
103 | delete d; | 108 | delete d; |
104 | } | 109 | } |
105 | 110 | ||
106 | void Pickboard::resetState() | 111 | void Pickboard::resetState() |
107 | { | 112 | { |
108 | d->picks->resetState(); | 113 | d->picks->resetState(); |
109 | } | 114 | } |
110 | 115 | ||
diff --git a/inputmethods/unikeyboard/unikeyboard.cpp b/inputmethods/unikeyboard/unikeyboard.cpp index aa74c66..23d96ad 100644 --- a/inputmethods/unikeyboard/unikeyboard.cpp +++ b/inputmethods/unikeyboard/unikeyboard.cpp | |||
@@ -12,25 +12,25 @@ | |||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "unikeyboard.h" | 21 | #include "unikeyboard.h" |
22 | 22 | ||
23 | #include <qpe/fontmanager.h> | 23 | #include <qpe/fontmanager.h> |
24 | 24 | #include <qpe/config.h> | |
25 | #include <qpainter.h> | 25 | #include <qpainter.h> |
26 | #include <qfontmetrics.h> | 26 | #include <qfontmetrics.h> |
27 | #include <qcombobox.h> | 27 | #include <qcombobox.h> |
28 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) | 28 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) |
29 | #include <qwindowsystem_qws.h> | 29 | #include <qwindowsystem_qws.h> |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | static const int nw = 8; | 32 | static const int nw = 8; |
33 | 33 | ||
34 | typedef struct BlockMap { | 34 | typedef struct BlockMap { |
35 | ushort start; | 35 | ushort start; |
36 | ushort stop; | 36 | ushort stop; |
@@ -126,25 +126,33 @@ static const BlockMap blockMap[] = | |||
126 | {0xFE30, 0xFE4F, "CJK Compatibility Forms"}, | 126 | {0xFE30, 0xFE4F, "CJK Compatibility Forms"}, |
127 | {0xFE50, 0xFE6F, "Small Form Variants"}, | 127 | {0xFE50, 0xFE6F, "Small Form Variants"}, |
128 | {0xFE70, 0xFEFE, "Arabic Presentation Forms-B"}, | 128 | {0xFE70, 0xFEFE, "Arabic Presentation Forms-B"}, |
129 | {0xFF00, 0xFEFF, "Halfwidth and Fullwidth Forms"}, | 129 | {0xFF00, 0xFEFF, "Halfwidth and Fullwidth Forms"}, |
130 | {0xFFF0, 0xFFEF, "Specials"}, | 130 | {0xFFF0, 0xFFEF, "Specials"}, |
131 | {0xFFFF, 0xFFFF, 0} }; | 131 | {0xFFFF, 0xFFFF, 0} }; |
132 | 132 | ||
133 | 133 | ||
134 | UniScrollview::UniScrollview(QWidget* parent, const char* name, int f) : | 134 | UniScrollview::UniScrollview(QWidget* parent, const char* name, int f) : |
135 | QScrollView(parent, name, f) | 135 | QScrollView(parent, name, f) |
136 | { | 136 | { |
137 | // smallFont.setRawName( "-adobe-courier-medium-r-normal--10-100-75-75-m-60-iso8859-1" ); //###### | 137 | // smallFont.setRawName( "-adobe-courier-medium-r-normal--10-100-75-75-m-60-iso8859-1" ); //###### |
138 | smallFont = QFont( "Helvetica", 8 ); | 138 | |
139 | // get the default font | ||
140 | Config *config = new Config( "qpe" ); | ||
141 | config->setGroup( "Appearance" ); | ||
142 | QString familyStr = config->readEntry( "FontFamily", "Helvetica" ); | ||
143 | int fontSize = config->readNumEntry( "FontSize", 8 ) - 2; | ||
144 | delete config; | ||
145 | |||
146 | smallFont = QFont( familyStr, fontSize ); | ||
139 | QFontMetrics sfm( smallFont ); | 147 | QFontMetrics sfm( smallFont ); |
140 | xoff = sfm.width( "AAA" ); | 148 | xoff = sfm.width( "AAA" ); |
141 | setFont( FontManager::unicodeFont( FontManager::Fixed ) ); | 149 | setFont( FontManager::unicodeFont( FontManager::Fixed ) ); |
142 | QFontMetrics fm( font() ); | 150 | QFontMetrics fm( font() ); |
143 | cellsize = fm.lineSpacing() + 2; | 151 | cellsize = fm.lineSpacing() + 2; |
144 | resizeContents( cellsize*nw, cellsize*65536/nw ); | 152 | resizeContents( cellsize*nw, cellsize*65536/nw ); |
145 | verticalScrollBar()->setLineStep(cellsize); | 153 | verticalScrollBar()->setLineStep(cellsize); |
146 | 154 | ||
147 | viewport()->setBackgroundMode( QWidget::PaletteBase ); | 155 | viewport()->setBackgroundMode( QWidget::PaletteBase ); |
148 | } | 156 | } |
149 | 157 | ||
150 | 158 | ||