Commit graph

98 commits

Author SHA1 Message Date
Hugo Pereira Da Costa
796e7ff92a Properly account for window's shaded state, and number of clients in groups when deciding whether or
not the titlebar should be hidden. This is half the job, cause the above does not work (yet) when 
grouping windows among which one has hidden titlebar. Shading works well now, though.

CCBUG: 260815

svn path=/trunk/KDE/kdebase/workspace/; revision=1208187
2010-12-20 22:18:52 +00:00
Hugo Pereira Da Costa
6309ac1928 OxygenClient: remove use of QWeakPointer for the glowAnimation_ as it is unnecessary: the object is never used outside of the class
and is a child of the client, deleted in the client destructor, by Qt.

Client, Button: removed useless acessor to the glowAnimation pointer.

svn path=/trunk/KDE/kdebase/workspace/; revision=1170327
2010-08-31 14:24:01 +00:00
Hugo Pereira Da Costa
1a1d2b964b Removed use of a weakPointer for storing the glowAnimation in buttons:
it is unnecessary since the object is never accessed outside of the button class, is a child and the button, and thus destroyed 
only in the button destructor, by Qt. 


svn path=/trunk/KDE/kdebase/workspace/; revision=1170321
2010-08-31 14:18:02 +00:00
Hugo Pereira Da Costa
2947ec516b - Simplified titleBar title color handling, moved to oxygenHelper, and cached.
- added some missing consts in Client.

svn path=/trunk/KDE/kdebase/workspace/; revision=1169247
2010-08-28 19:58:22 +00:00
Hugo Pereira Da Costa
18042bba95 removed all connections to QPropertyAnimation::valueChanged() and call relevant update in the 'setValue' method directly, instead
svn path=/trunk/KDE/kdebase/workspace/; revision=1168989
2010-08-28 02:52:26 +00:00
Hugo Pereira Da Costa
393e2b86bc Removed superfluous connections to animation 'finished' signal.
svn path=/trunk/KDE/kdebase/workspace/; revision=1168969
2010-08-28 02:02:50 +00:00
Hugo Pereira Da Costa
ed8788d3af - added utility inline functions for readability
- cleaned up color handling
- fixed appearance of toggled keep above and keep-below buttons, consistently with the 'on all desktop' 
button.

svn path=/trunk/KDE/kdebase/workspace/; revision=1146313
2010-07-05 17:39:25 +00:00
Hugo Pereira Da Costa
15c614b6c9 replace calls to MyClass::myMethod by this->myMethod
svn path=/trunk/KDE/kdebase/workspace/; revision=1128994
2010-05-20 22:00:13 +00:00
Hugo Pereira Da Costa
97371a74c2 Moved hover and focus brush from Oxygen::StyleHelper to OxygenHelper so that they can be used in in the decoration, for
optimization. 

Added "NegativeText" brush, to optimize rendering of close buttons. 

Renamed OxygenHelper to Oxygen::Helper for consistency with the other classes. (needs full update of workspace/libs/oxygen, 
kstyles/oxygen and kwin/clients/oxygen, but this is already true for the above ...)


svn path=/trunk/KDE/kdebase/workspace/; revision=1125082
2010-05-10 16:36:56 +00:00
Hugo Pereira Da Costa
43d7384663 oxygen.h/.cpp renamed to oxygenfactory.h/.cpp for consistency.
svn path=/trunk/KDE/kdebase/workspace/; revision=1121941
2010-05-02 18:38:05 +00:00
Hugo Pereira Da Costa
c5bf8d012e Changed all "Oxygen::OxygenXXX" classnames into "Oxygen::XXX" for consistancy with style class
naming scheme. Also made indentation consistent.

svn path=/trunk/KDE/kdebase/workspace/; revision=1121935
2010-05-02 18:34:08 +00:00
Hugo Pereira Da Costa
f0e2ceab7d reorganized button painting code to avoid code duplication
svn path=/trunk/KDE/kdebase/workspace/; revision=1107181
2010-03-25 00:45:33 +00:00
Hugo Pereira Da Costa
84868a37c6 explicitely use oxygendecohelper rather than oxygenhelper
svn path=/trunk/KDE/kdebase/workspace/; revision=1099031
2010-03-04 22:51:08 +00:00
Hugo Pereira Da Costa
5a852ac75b make sure that the (hidden) useAnimation flag also disables button hover animated glow
svn path=/trunk/KDE/kdebase/workspace/; revision=1084320
2010-02-02 21:55:56 +00:00
Hugo Pereira Da Costa
e2240a8427 Do not activate button pressed animation when no action is triggered when doing so (e.g right button press on Window-Close)
svn path=/trunk/KDE/kdebase/workspace/; revision=1073152
2010-01-11 18:32:56 +00:00
Hugo Pereira Da Costa
e49597ecd3 use QPropertyAnimation instead of QTimeLine to handle transitions
svn path=/trunk/KDE/kdebase/workspace/; revision=1069986
2010-01-04 16:42:46 +00:00
Hugo Pereira Da Costa
84e7363aa0 fixed title and button alignment in maximized mode
svn path=/trunk/KDE/kdebase/workspace/; revision=1051237
2009-11-19 04:11:21 +00:00
Hugo Pereira Da Costa
045daadccb used external lib/oxygenanimation class to handle animations in place of QTimeLine. This will make transition to Qt Kinetic easier
svn path=/trunk/KDE/kdebase/workspace/; revision=1050690
2009-11-17 21:56:04 +00:00
Lucas Murray
a0d07d12a2 Merged r970865:1049322 from /branches/work/kwin-tabbing
Adds window tabbing support to KWin.
FEATURE: 42023

svn path=/trunk/KDE/kdebase/workspace/; revision=1049334
2009-11-15 03:24:04 +00:00
Hugo Pereira Da Costa
d4344b7bba added the possibility to hide decoration 'titlebar', but not decoration 'border' in window-specific override rules
svn path=/trunk/KDE/kdebase/workspace/; revision=1046005
2009-11-07 03:33:53 +00:00
Hugo Pereira Da Costa
64b80fc1fe Fixed background role for button icon. CCBUG: 156518
svn path=/trunk/KDE/kdebase/workspace/; revision=1037374
2009-10-18 21:14:40 +00:00
Hugo Pereira Da Costa
f761aceb8b removed background window rendering from button paintEvent, as transparent background is good enough. Moved all corresponding method in oxygenClient to 'protected'. This allows faster repaint.
svn path=/trunk/KDE/kdebase/workspace/; revision=1036357
2009-10-17 06:57:17 +00:00
Hugo Pereira Da Costa
07cab1bae9 optimized painting in outline mode (by avoiding unnecessary painting over) and added contrast pixel between window body and outlined border
svn path=/trunk/KDE/kdebase/workspace/; revision=1036214
2009-10-16 20:27:43 +00:00
Hugo Pereira Da Costa
444427464b removed useless kdebug messages
svn path=/trunk/KDE/kdebase/workspace/; revision=1036118
2009-10-16 16:32:51 +00:00
Hugo Pereira Da Costa
88cfb2df63 changed back 'setDirty' method into 'update' method. kwin/paintRedirector should be fixed though, so that buttons created after the deco is registered for redirection are properly accounted for
svn path=/trunk/KDE/kdebase/workspace/; revision=1036114
2009-10-16 16:25:02 +00:00
Hugo Pereira Da Costa
e26538e368 port design changes from tabbing branch to trunk: new title outline design; simplification of layout metrics; proper handling of text ellision; simplification of shadow cache; addition of to local button types. In oxygen.h also temporarily added missing enumeration to ease compilation against kde4.3
svn path=/trunk/KDE/kdebase/workspace/; revision=1035658
2009-10-15 16:03:30 +00:00
Hugo Pereira Da Costa
253892d5dd More code cleanup: moved declaration of 'reduceContrast' and 'renderDot' global functions to oxygenclient.h. Added 'renderFlags' to control which part of the button is to be drawn. Also added flag to force button as 'inactive' even if belonging to an active window (needed for window tabs)
svn path=/trunk/KDE/kdebase/workspace/; revision=1035245
2009-10-14 15:36:38 +00:00
Hugo Pereira Da Costa
cef60f90cb removed useless colorCacheInvalid_ member
svn path=/trunk/KDE/kdebase/workspace/; revision=1034964
2009-10-14 02:55:40 +00:00
Hugo Pereira Da Costa
7d7d986428 fixed vertical translation of buttons and title when compositing is disabled; Added an extra pixel to borderTiny when compositing is disabled (otherwise one can't draw the resize 'dots' due to the float frame; and used helper::roundedMask and helper::rounderRegion to minimize code duplication with style
svn path=/trunk/KDE/kdebase/workspace/; revision=1034562
2009-10-13 03:38:26 +00:00
Hugo Pereira Da Costa
d614414bac removed color overwrite for checked sticky button: it conflicts with icon contrast pixel
svn path=/trunk/KDE/kdebase/workspace/; revision=1034010
2009-10-11 19:01:07 +00:00
Hugo Pereira Da Costa
a528f0e7ac made 'on all desktops' button appear 'pressed' when checked, to be more visible
svn path=/trunk/KDE/kdebase/workspace/; revision=1034009
2009-10-11 18:56:30 +00:00
Hugo Pereira Da Costa
09364cdac0 removed unnecessary block braces
svn path=/trunk/KDE/kdebase/workspace/; revision=1033971
2009-10-11 17:13:50 +00:00
Hugo Pereira Da Costa
3a155c8f8c do not translate buttons up for maximized windows, because it collides with screen border otherwise
svn path=/trunk/KDE/kdebase/workspace/; revision=1032967
2009-10-09 00:26:57 +00:00
Hugo Pereira Da Costa
458ded5de1 moved title and buttons one pixel up, adjusted title outline and window border (in outline mode) accordingly. Also added a 'shadow' pixel on the sides and at the bottom of the active window border outline, and removed an unnecessary 'if( true )'.
svn path=/trunk/KDE/kdebase/workspace/; revision=1032966
2009-10-09 00:19:32 +00:00
Hugo Pereira Da Costa
90f10f219a implemented new buttons (from nuno)
svn path=/trunk/KDE/kdebase/workspace/; revision=1032950
2009-10-08 23:01:35 +00:00
Hugo Pereira Da Costa
5fdf18e65f readded '-1' pixel offset; reverted to old CMakeList.txt; removed unecessary ifdef in oxygen.h (should not have been commited in the first place.
svn path=/trunk/KDE/kdebase/workspace/; revision=1032315
2009-10-07 14:26:52 +00:00
Hugo Pereira Da Costa
f957a7b7cd fixed drawFloatFrame for shaded maximized windows
svn path=/trunk/KDE/kdebase/workspace/; revision=1032310
2009-10-07 14:23:14 +00:00
Hugo Pereira Da Costa
8df96b21ba removed unused light/dark colors; moved painter translation before drawing of menu icon for consistency with other buttons
svn path=/trunk/KDE/kdebase/workspace/; revision=1031800
2009-10-06 06:36:52 +00:00
Hugo Pereira Da Costa
89453d5147 removed use of QPainter::setOpacity to render transitions. This makes the code faster
svn path=/trunk/KDE/kdebase/workspace/; revision=1028374
2009-09-26 21:21:39 +00:00
Hugo Pereira Da Costa
b4f63cb440 fixed Qt headers; removed WX11 defines; removed 'using namespace std'
svn path=/trunk/KDE/kdebase/workspace/; revision=1025937
2009-09-20 07:42:03 +00:00
Hugo Pereira Da Costa
99c012ab33 Changed inactive button shape to match active button; moved more methods inline; added smooth transition between active and inactive button
svn path=/trunk/KDE/kdebase/workspace/; revision=1025846
2009-09-19 21:12:57 +00:00
Hugo Pereira Da Costa
29cfa52c0a disabled glow animation when a button is pressed -e.g. with right click, released, then left, because it was causing a glitch.
svn path=/trunk/KDE/kdebase/workspace/; revision=1025378
2009-09-18 15:03:59 +00:00
Hugo Pereira Da Costa
635c93bc5b Added smooth transition between active and inactive state. This affects (when enabled) the window shadow,
the horizontal separator line, the titlebar text color and the title+border window outline. 


svn path=/trunk/KDE/kdebase/workspace/; revision=1025111
2009-09-18 01:32:27 +00:00
Hugo Pereira Da Costa
7813c45245 simplified button animation code
svn path=/trunk/KDE/kdebase/workspace/; revision=1025073
2009-09-17 23:08:49 +00:00
Hugo Pereira Da Costa
9eec5543bf Moved all shadow handling into global cache oxygenShadowCache. This allows to share same
shadow tilesets between clients, thus reducing the memory usage; to simplify the oxygenclient
class; and leave room for optimizing active/inactive shadow transitions. The global class is
declared using K_GLOBAL_STATIC_WITH_ARGS.

Also cleaned-up unnecessary headers.


svn path=/trunk/KDE/kdebase/workspace/; revision=1025063
2009-09-17 22:40:06 +00:00
Hugo Pereira Da Costa
1495f281c2 fixed animation glitch when leaving button while pressed
svn path=/trunk/KDE/kdebase/workspace/; revision=1024652
2009-09-17 04:23:38 +00:00
Hugo Pereira Da Costa
45f5f00f9f Removed oxygentimeline (was not working). Use qtimeline directly, to handle animations. It is simpler, and it is actually working. Also changed 'repaint' into 'update' for the slot connected to the timeLine FrameChanged signal. More efficient.
svn path=/trunk/KDE/kdebase/workspace/; revision=1024648
2009-09-17 03:43:55 +00:00
Hugo Pereira Da Costa
45717eeae9 Fixed glitch between glow pixmap and icon color when animating glow
svn path=/trunk/KDE/kdebase/workspace/; revision=1024491
2009-09-16 17:16:55 +00:00
Hugo Pereira Da Costa
e679d07b93 Added animated button glow.
svn path=/trunk/KDE/kdebase/workspace/; revision=1024489
2009-09-16 17:09:33 +00:00
Hugo Pereira Da Costa
363986a030 fixed Krazy stuff (headers, K classes in place of Q classes, and use of pointers to modal dialogs)
svn path=/trunk/KDE/kdebase/workspace/; revision=1024127
2009-09-16 06:09:31 +00:00