-rw-r--r-- | libopie2/opieui/otabbar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opieui/otabbar.cpp b/libopie2/opieui/otabbar.cpp index cd3a34b..a62e18b 100644 --- a/libopie2/opieui/otabbar.cpp +++ b/libopie2/opieui/otabbar.cpp | |||
@@ -10,49 +10,49 @@ | |||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 14 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <opie2/otabbar.h> | 32 | #include <opie2/otabbar.h> |
33 | 33 | ||
34 | using namespace Opie; | 34 | using namespace Opie::Ui; |
35 | 35 | ||
36 | OTabBar::OTabBar( QWidget *parent , const char *name ) | 36 | OTabBar::OTabBar( QWidget *parent , const char *name ) |
37 | :QTabBar( parent, name ) | 37 | :QTabBar( parent, name ) |
38 | {} | 38 | {} |
39 | 39 | ||
40 | void OTabBar::paintLabel( QPainter* p, const QRect& br, QTab* t, bool has_focus ) const | 40 | void OTabBar::paintLabel( QPainter* p, const QRect& br, QTab* t, bool has_focus ) const |
41 | { | 41 | { |
42 | 42 | ||
43 | QRect r = br; | 43 | QRect r = br; |
44 | if ( t->iconset) | 44 | if ( t->iconset) |
45 | { | 45 | { |
46 | QIconSet::Mode mode = (t->enabled && isEnabled()) ? QIconSet::Normal : QIconSet::Disabled; | 46 | QIconSet::Mode mode = (t->enabled && isEnabled()) ? QIconSet::Normal : QIconSet::Disabled; |
47 | if ( mode == QIconSet::Normal && has_focus ) | 47 | if ( mode == QIconSet::Normal && has_focus ) |
48 | { | 48 | { |
49 | mode = QIconSet::Active; | 49 | mode = QIconSet::Active; |
50 | } | 50 | } |
51 | QPixmap pixmap = t->iconset->pixmap( QIconSet::Small, mode ); | 51 | QPixmap pixmap = t->iconset->pixmap( QIconSet::Small, mode ); |
52 | int pixw = pixmap.width(); | 52 | int pixw = pixmap.width(); |
53 | int pixh = pixmap.height(); | 53 | int pixh = pixmap.height(); |
54 | r.setLeft( r.left() + pixw + 2 ); | 54 | r.setLeft( r.left() + pixw + 2 ); |
55 | p->drawPixmap( br.left()+2, br.center().y()-pixh/2, pixmap ); | 55 | p->drawPixmap( br.left()+2, br.center().y()-pixh/2, pixmap ); |
56 | } | 56 | } |
57 | 57 | ||
58 | QRect tr = r; | 58 | QRect tr = r; |