Commit Graph

72 Commits

Author SHA1 Message Date
Matthias Fuchs
d9568fb2c5 Adds a setTabHighlighted and a isTabHighligted method to Plasma::TabBar.
When a tab is highlighted the text is drawn with a different color.
The icon will then have an active effect and a pressed button will be drawn at its background.

REVIEW:101264
2011-05-04 13:01:30 +02:00
Alex Merry
54ad0622e7 Simplify an if-else statement in the tabbar - d->tabBarShown makes the else if condition obsolete
svn path=/trunk/KDE/kdelibs/; revision=1212398
2011-01-06 20:50:09 +00:00
Alex Merry
082ddcb95a Don't add the tabbar to the layout twice, or try to remove it twice.
BUG: 258867


svn path=/trunk/KDE/kdelibs/; revision=1212395
2011-01-06 20:33:56 +00:00
Marco Martin
07610e04ea try to remove the hardcoded size hint of the tabbar proxy widget.. the Qt bug that it was masking should be gone now
svn path=/trunk/KDE/kdelibs/; revision=1202100
2010-11-29 17:08:52 +00:00
Marco Martin
1d9da0068e fix behaviour of setTabBarShown
svn path=/trunk/KDE/kdelibs/; revision=1202099
2010-11-29 17:00:26 +00:00
David Faure
a48ae5b0d8 Fix compilation with gcc < 4.5
svn path=/trunk/KDE/kdelibs/; revision=1188570
2010-10-22 16:55:46 +00:00
Aaron J. Seigo
a793185b21 consolidate all the theming (palette, fonts) code for widgets into a private interface: ThemeWidgetInterface. have the relevant *Private classes inherit from it and all the tricky logic is now in one place and consistent.
svn path=/trunk/KDE/kdelibs/; revision=1188314
2010-10-22 00:25:17 +00:00
Aaron J. Seigo
021d8e4823 * don't set the font on the native widget in change events
* don't set the palette on the native widget in change events
* reset the value of customFont when it is set specifically because !customFont (allowing future theme changes to take effect as a result)

svn path=/trunk/KDE/kdelibs/; revision=1187721
2010-10-20 10:07:40 +00:00
Aaron J. Seigo
4c5f141992 don't set the native widget's palette. since this now works in QGraphicsProxyWidget, it now causes new problems: setting the palette on the widget (not the nativeWidget()) doesn't work for users of Plasma::* widgets. love it when work arounds to bugs cause new bugs once the original bugs are fixed upstream. ;)
svn path=/trunk/KDE/kdelibs/; revision=1185467
2010-10-13 13:16:35 +00:00
Giulio Camuffo
72b4a73b5d make the tabbar resize vertically when there are no tabs too
svn path=/trunk/KDE/kdelibs/; revision=1179179
2010-09-24 18:42:00 +00:00
Marco Martin
8e5a2533b5 save the state of tabBarShown: prevents tabbar to reappear when it shouldn't
svn path=/trunk/KDE/kdelibs/; revision=1177838
2010-09-21 12:19:43 +00:00
Marco Martin
7d00f6c756 fix takeTab behaviour
svn path=/trunk/KDE/kdelibs/; revision=1177582
2010-09-20 16:27:05 +00:00
Aaron J. Seigo
6f0631d700 taking an item also requires re-setting the parent
BUG:250420

svn path=/trunk/KDE/kdelibs/; revision=1173601
2010-09-09 20:12:03 +00:00
Aaron J. Seigo
6aa1aab52b make the checks consistent with the rest of the methods: check the count of d->pages, not the tabwidget proxy; use value() instead of [] as it is protected against OOB indexes
BUG:248976

svn path=/trunk/KDE/kdelibs/; revision=1168059
2010-08-26 01:22:45 +00:00
Giulio Camuffo
8002b2415b add support for adding two qgw on the sides of the tabbar
svn path=/trunk/KDE/kdelibs/; revision=1148951
2010-07-12 08:29:49 +00:00
Giulio Camuffo
93a955c984 do the proper animation when deleting the current tab
svn path=/trunk/KDE/kdelibs/; revision=1147189
2010-07-07 15:17:48 +00:00
Marco Martin
b8342b9412 fix the animation
svn path=/trunk/KDE/kdelibs/; revision=1138778
2010-06-16 18:00:38 +00:00
Marco Martin
c7e7ea0f6d expanding size policy in the pages seems to work better (prefferred is still the parent widget)
svn path=/trunk/KDE/kdelibs/; revision=1130262
2010-05-24 21:20:33 +00:00
Marco Martin
325d6a7c67 e weakpointers for the animated pages: avoids crashes when a tab gets removed and immeadiately added another one (happens when switching activity type for instance)
svn path=/trunk/KDE/kdelibs/; revision=1127865
2010-05-17 20:46:35 +00:00
Marco Martin
28386758e1 check the tasget item is still alive, crash--
svn path=/trunk/KDE/kdelibs/; revision=1119672
2010-04-27 16:02:51 +00:00
Marco Martin
3d8425e6ef don't bork horizontal tabbar size
svn path=/trunk/KDE/kdelibs/; revision=1117183
2010-04-21 13:16:46 +00:00
Marco Martin
36e45c7929 behave slightly better in layouts
svn path=/trunk/KDE/kdelibs/; revision=1117180
2010-04-21 13:05:57 +00:00
Marco Martin
ee661f4347 while still adjusting hard size hints, keep the tabbar centered
svn path=/trunk/KDE/kdelibs/; revision=1115434
2010-04-16 12:57:59 +00:00
Marco Martin
6ff8621d3a update fixed size hints as soon as the tabwidgetmode changes
svn path=/trunk/KDE/kdelibs/; revision=1115431
2010-04-16 12:51:07 +00:00
Marco Martin
92730e9e15 (almost) fix the tabbar animation.
there are still repaint issues on the native tabbar tough

svn path=/trunk/KDE/kdelibs/; revision=1085531
2010-02-05 12:24:46 +00:00
Aaron J. Seigo
751e79c666 SVN_SILENT: remove some fairly silly debug output
svn path=/trunk/KDE/kdelibs/; revision=1083611
2010-02-01 16:23:08 +00:00
Igor Trindade Oliveira
157711c581 port tabbar to new animation api.
svn path=/trunk/KDE/kdelibs/; revision=1078747
2010-01-22 19:31:42 +00:00
Marco Martin
eb13d0f4cd unbreak when the tabbar is hidden
svn path=/trunk/KDE/kdelibs/; revision=1060780
2009-12-09 21:24:58 +00:00
Marco Martin
a5ccb23ebd it appears is necessary to resize the new page 2 times for it to take effect, invalidating the layout doesn't seem to be enough
svn path=/trunk/KDE/kdelibs/; revision=1060726
2009-12-09 19:19:00 +00:00
Marco Martin
f449a1586a remove a bit of margins
svn path=/trunk/KDE/kdelibs/; revision=1060698
2009-12-09 17:44:56 +00:00
Petri Damstén
71fa982797 * Use correct font for size hint in Frame
* Use correct font in IconWidget setLayoutOptions
* layout fonts are set in IconWidget setLayoutOptions and layoutTextItems. No need to set them in paint.
* Fix using QGraphicsWidget font when customFont == true in several widgets.

svn path=/trunk/KDE/kdelibs/; revision=1047017
2009-11-10 09:46:14 +00:00
Marco Martin
5bd2af94f8 invalidate the main layout when te new page is inserted, only way to get
the preferred size right, apparently

svn path=/trunk/KDE/kdelibs/; revision=1042410
2009-10-29 19:05:04 +00:00
Marco Martin
c71cd00557 delay cuurentchanged after the animation, use a preferredsize policy for the
pages

svn path=/trunk/KDE/kdelibs/; revision=1042395
2009-10-29 18:31:27 +00:00
Marco Martin
4418fb8971 revert last bogus commit
svn path=/trunk/KDE/kdelibs/; revision=1042383
2009-10-29 17:58:52 +00:00
Marco Martin
7e8d330582 some qgraphicslayout hack to return a meaningful size hint, pretty
unfortunate

svn path=/trunk/KDE/kdelibs/; revision=1042375
2009-10-29 17:50:44 +00:00
Aaron J. Seigo
211a206277 the count is always 1 larger than the index, so > is not enough
svn path=/trunk/KDE/kdelibs/; revision=1036289
2009-10-16 22:41:39 +00:00
Marco Martin
0e59e70583 move correctly the pages at the first animation
svn path=/trunk/KDE/kdelibs/; revision=1031682
2009-10-05 18:40:58 +00:00
Marco Martin
bb11bbf81b another null pointer check
svn path=/trunk/KDE/kdelibs/; revision=1027780
2009-09-24 18:52:58 +00:00
Marco Martin
03c1fca71d properly fix previous commit don't crash setting an active page < 0
don't crash setting a new one if the old one was 0

svn path=/trunk/KDE/kdelibs/; revision=1027767
2009-09-24 18:26:48 +00:00
Marco Martin
1ae2f714bb don't explode on setCurrentIndex(index<0)
svn path=/trunk/KDE/kdelibs/; revision=1027763
2009-09-24 17:57:53 +00:00
Marco Martin
eedf3c47ff update the current index when inserting tabs
svn path=/trunk/KDE/kdelibs/; revision=1026753
2009-09-22 14:04:20 +00:00
Marco Martin
b16ed00bc4 off by one, crash--
svn path=/trunk/KDE/kdelibs/; revision=1026750
2009-09-22 13:53:29 +00:00
Marco Martin
67515c758a always use plasma::theme font, unless somebody call setFont on the
widget                                                                                
round two: sync the native widgets fonts with the plasma::theme font,                 
unless setFont was called

svn path=/trunk/KDE/kdelibs/; revision=1023050
2009-09-13 19:18:29 +00:00
Marco Martin
462f323042 add tabAt(int) function
actually the correspondent qtabwidget is widget(), but on a
qgraphicsproxywidget it is taken, maybe needs a beter name?
CCMAIL: plasma-devel@kde.org

svn path=/trunk/KDE/kdelibs/; revision=1019013
2009-09-02 15:54:18 +00:00
Aaron J. Seigo
1e8fc7272f only reset the sizes when we have no tabs
BUG:205457

svn path=/trunk/KDE/kdelibs/; revision=1016724
2009-08-28 17:28:15 +00:00
Marco Martin
6257d4b7a8 takeTab(), removes a tab and returns the tab contents
svn path=/trunk/KDE/kdelibs/; revision=1004310
2009-07-29 20:30:07 +00:00
Aaron J. Seigo
ff763aab1a SVN_SILENT:--compilerWarnings;
svn path=/trunk/KDE/kdelibs/; revision=951382
2009-04-09 06:00:57 +00:00
Marco Martin
2ebcc9f481 workaround on a qt bug: if i call setVisible(true) on a child of an
hidden item it gets shown anyways (will get around doing a test case)

svn path=/trunk/KDE/kdelibs/; revision=946139
2009-03-28 19:11:43 +00:00
Marco Martin
9fd15b5e2f check if the layout has also the tabwidget widget or not, crash--
svn path=/trunk/KDE/kdelibs/; revision=930400
2009-02-23 11:26:45 +00:00
Marco Martin
7c9a500b3d move the wheelEvent to nativeTabbar, it seems it works only there with
qt 4.5, while with 4.4 did work only in the proxywidget 

svn path=/trunk/KDE/kdelibs/; revision=925477
2009-02-13 11:43:58 +00:00