[kcmdeco] Adjust to kdecoration changes

There are no unstable classes any more.
This commit is contained in:
Martin Gräßlin 2013-10-01 08:01:10 +02:00
parent 8681c69d60
commit 56722972a7
2 changed files with 9 additions and 14 deletions

View file

@ -118,13 +118,11 @@ void KDecorationPreview::render(QPainter *painter, KDecoration *decoration, cons
int padLeft, padRight, padTop, padBottom;
padLeft = padRight = padTop = padBottom = 0;
bool useMask = true;
if (KDecorationUnstable *unstable = qobject_cast<KDecorationUnstable *>(decoration)) {
unstable->padding(padLeft, padRight, padTop, padBottom);
size.setWidth(size.width() + padLeft + padRight);
size.setHeight(size.height() + padTop + padBottom);
if (padLeft || padRight || padTop || padBottom) {
useMask = false;
}
decoration->padding(padLeft, padRight, padTop, padBottom);
size.setWidth(size.width() + padLeft + padRight);
size.setHeight(size.height() + padTop + padBottom);
if (padLeft || padRight || padTop || padBottom) {
useMask = false;
}
decoration->resize(size);
@ -479,11 +477,10 @@ KDecorationPreviewOptions::~KDecorationPreviewOptions()
{
}
unsigned long KDecorationPreviewOptions::updateSettings()
void KDecorationPreviewOptions::updateSettings()
{
KConfig cfg("kwinrc");
unsigned long changed = 0;
changed |= KDecorationOptions::updateSettings(&cfg);
KDecorationOptions::updateSettings(&cfg);
// set custom border size/buttons
if (customBorderSize != BordersCount)
@ -499,8 +496,6 @@ unsigned long KDecorationPreviewOptions::updateSettings()
setTitleButtonsLeft(KDecorationOptions::defaultTitleButtonsLeft());
setTitleButtonsRight(KDecorationOptions::defaultTitleButtonsRight());
}
return changed;
}
void KDecorationPreviewOptions::setCustomBorderSize(BorderSize size)

View file

@ -60,7 +60,7 @@ private:
};
class KDecorationPreviewBridge
: public KDecorationBridgeUnstable
: public KDecorationBridge
{
public:
KDecorationPreviewBridge(KDecorationPreview* preview, bool active);
@ -139,7 +139,7 @@ class KDecorationPreviewOptions
public:
KDecorationPreviewOptions();
virtual ~KDecorationPreviewOptions();
virtual unsigned long updateSettings();
void updateSettings();
void setCustomBorderSize(BorderSize size);
void setCustomTitleButtonsEnabled(bool enabled);