Changeset View
Changeset View
Standalone View
Standalone View
kstyle/breezehelper.h
Show All 22 Lines | |||||
23 | 23 | | |||
24 | #include "breeze.h" | 24 | #include "breeze.h" | ||
25 | #include "breezeanimationdata.h" | 25 | #include "breezeanimationdata.h" | ||
26 | #include "config-breeze.h" | 26 | #include "config-breeze.h" | ||
27 | 27 | | |||
28 | #include <KColorScheme> | 28 | #include <KColorScheme> | ||
29 | #include <KSharedConfig> | 29 | #include <KSharedConfig> | ||
30 | 30 | | |||
31 | #include <QToolBar> | ||||
hpereiradacosta: Not needed as far as I can tell (none of your changes in this file require QToolbar) | |||||
cblack: This is necessary to compile. | |||||
31 | #include <QPainterPath> | 32 | #include <QPainterPath> | ||
32 | #include <QWidget> | 33 | #include <QWidget> | ||
33 | 34 | | |||
34 | namespace Breeze | 35 | namespace Breeze | ||
35 | { | 36 | { | ||
36 | 37 | | |||
37 | //* breeze style helper class. | 38 | //* breeze style helper class. | ||
38 | /** contains utility functions used at multiple places in both breeze style and breeze window decoration */ | 39 | /** contains utility functions used at multiple places in both breeze style and breeze window decoration */ | ||
▲ Show 20 Lines • Show All 202 Lines • ▼ Show 20 Line(s) | 41 | { | |||
241 | void renderDecorationButton( QPainter*, const QRect&, const QColor&, ButtonType, bool inverted ) const; | 242 | void renderDecorationButton( QPainter*, const QRect&, const QColor&, ButtonType, bool inverted ) const; | ||
242 | 243 | | |||
243 | //* generic shadow for rounded rectangles | 244 | //* generic shadow for rounded rectangles | ||
244 | void renderRoundedRectShadow ( QPainter*, const QRectF&, const QColor&, qreal radius = Metrics::Frame_FrameRadius - 0.5 ) const; | 245 | void renderRoundedRectShadow ( QPainter*, const QRectF&, const QColor&, qreal radius = Metrics::Frame_FrameRadius - 0.5 ) const; | ||
245 | 246 | | |||
246 | //* generic shadow for ellipses | 247 | //* generic shadow for ellipses | ||
247 | void renderEllipseShadow( QPainter*, const QRectF&, const QColor& ) const; | 248 | void renderEllipseShadow( QPainter*, const QRectF&, const QColor& ) const; | ||
248 | 249 | | |||
250 | //* draw the tools area border | ||||
251 | void renderToolsAreaBorder ( QPainter*, const QWidget* ) const; | ||||
252 | | ||||
249 | //@} | 253 | //@} | ||
250 | 254 | | |||
251 | //*@name compositing utilities | 255 | //*@name compositing utilities | ||
252 | //@{ | 256 | //@{ | ||
253 | 257 | | |||
254 | //* true if style was compiled for and is running on X11 | 258 | //* true if style was compiled for and is running on X11 | ||
255 | static bool isX11(); | 259 | static bool isX11(); | ||
256 | 260 | | |||
257 | //* true if running on platform Wayland | 261 | //* true if running on platform Wayland | ||
258 | static bool isWayland(); | 262 | static bool isWayland(); | ||
259 | 263 | | |||
260 | //* returns true if compositing is active | 264 | //* returns true if compositing is active | ||
261 | bool compositingActive() const; | 265 | bool compositingActive() const; | ||
262 | 266 | | |||
263 | //* returns true if a given widget supports alpha channel | 267 | //* returns true if a given widget supports alpha channel | ||
264 | bool hasAlphaChannel( const QWidget* ) const; | 268 | bool hasAlphaChannel( const QWidget* ) const; | ||
265 | 269 | | |||
270 | //* returns true if widget is in the tools area | ||||
271 | bool isInToolsArea( const QWidget* ) const; | ||||
272 | | ||||
273 | //* returns false if tools area is empty | ||||
274 | bool toolsAreaHasContents ( const QWidget* ) const; | ||||
275 | | ||||
276 | //* returns true if tools area has a toolbar | ||||
277 | bool toolsAreaHasToolBar ( const QWidget* ) const; | ||||
278 | | ||||
279 | //* returns true if the tools area should be drawn | ||||
280 | bool shouldDrawToolsArea ( const QWidget* ) const; | ||||
281 | | ||||
282 | //* returns the united rectangle of all toolbars in the tools area | ||||
283 | QRect toolsAreaToolbarsRect (const QWidget* widget) const; | ||||
284 | | ||||
285 | QToolBar* grabToolBarForToolsArea ( const QWidget* ) const; | ||||
286 | | ||||
266 | //@} | 287 | //@} | ||
267 | 288 | | |||
268 | //@name high dpi utility functions | 289 | //@name high dpi utility functions | ||
269 | //@{ | 290 | //@{ | ||
270 | 291 | | |||
271 | //* return dpi-aware pixmap of given size | 292 | //* return dpi-aware pixmap of given size | ||
272 | virtual QPixmap highDpiPixmap( const QSize& size ) const | 293 | virtual QPixmap highDpiPixmap( const QSize& size ) const | ||
273 | { return highDpiPixmap( size.width(), size.height() ); } | 294 | { return highDpiPixmap( size.width(), size.height() ); } | ||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |
Not needed as far as I can tell (none of your changes in this file require QToolbar)