Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
kdebase4-workspace
kwin-suse.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kwin-suse.diff of Package kdebase4-workspace
Index: kwin/clients/ozone/oxygenclient.cpp =================================================================== --- kwin/clients/ozone/oxygenclient.cpp (revision 866283) +++ kwin/clients/ozone/oxygenclient.cpp (working copy) @@ -58,6 +58,9 @@ #include "oxygenbutton.h" #include "oxygen.h" +#define logourl "/usr/share/kde4/apps/kwin/titlebar_decor.png" +#define logooffset 5 + namespace Ozone { namespace Oxygen @@ -76,6 +79,7 @@ , colorCacheInvalid_(true) , helper_(*globalHelper) { + logo.load(logourl); } OxygenClient::~OxygenClient() @@ -289,7 +293,7 @@ const int titleWidth = frame.width() - titleEdgeLeft - layoutMetric(LM_TitleEdgeRight) - buttonsLeftWidth() - buttonsRightWidth() - - marginLeft - marginRight; + marginLeft - marginRight - logo.width() - logooffset; QPalette pal2( palette ); if( !OxygenFactory::blendTitlebarColors()) { @@ -305,6 +309,12 @@ painter.drawText(titleLeft, titleTop-1, titleWidth, titleHeight, // -1 is to go into top resizearea OxygenFactory::titleAlign() | Qt::AlignVCenter, caption()); + if (isActive()) { + QFontMetrics fm(options()->font(isActive(), false)); + painter.drawImage(titleEdgeLeft + layoutMetric(LM_TitleEdgeRight) + buttonsLeftWidth() + + qMin(fm.width(caption()), titleWidth) + logooffset, titleTop, logo); + } + painter.setRenderHint(QPainter::Antialiasing); // Draw dividing line @@ -348,7 +358,7 @@ } if (align & Qt::AlignLeft) { - int left = titleLeft + QFontMetrics(options()->font(isActive(), false)).width(caption()); + int left = titleLeft + QFontMetrics(options()->font(isActive(), false)).width(caption()) + logo.width() + logooffset; int right = titleLeft + titleWidth; drawScratch(&painter, palette, left, right, titleTop+6); } Index: kwin/clients/ozone/oxygenclient.h =================================================================== --- kwin/clients/ozone/oxygenclient.h (revision 866283) +++ kwin/clients/ozone/oxygenclient.h (working copy) @@ -59,6 +59,7 @@ QColor titlebarTextColor(const QPalette &palette); bool colorCacheInvalid_; QColor cachedTitlebarTextColor_; + QImage logo; protected: friend class OxygenButton;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor