diff options
Diffstat (limited to 'kicker/applets')
-rw-r--r-- | kicker/applets/minipager/pagerapplet.cpp | 9 | ||||
-rw-r--r-- | kicker/applets/minipager/pagerapplet.h | 3 | ||||
-rw-r--r-- | kicker/applets/minipager/pagerbutton.cpp | 76 | ||||
-rw-r--r-- | kicker/applets/minipager/pagersettings.kcfg | 9 |
4 files changed, 42 insertions, 55 deletions
diff --git a/kicker/applets/minipager/pagerapplet.cpp b/kicker/applets/minipager/pagerapplet.cpp index 25e6e040d..eadb23b91 100644 --- a/kicker/applets/minipager/pagerapplet.cpp +++ b/kicker/applets/minipager/pagerapplet.cpp @@ -442,7 +442,7 @@ void KMiniPager::wheelEvent( TQWheelEvent* e ) { int newDesk; int desktops = KWin::numberOfDesktops(); - + if(cycleWindow()){ @@ -456,7 +456,7 @@ void KMiniPager::wheelEvent( TQWheelEvent* e ) { newDesk = (desktops + m_curDesk - 2) % desktops + 1; } - + slotButtonSelected(newDesk); } } @@ -735,6 +735,7 @@ void KMiniPager::aboutToShowContextMenu() showMenu->insertItem(i18n("&Window Thumbnails"), WindowThumbnails); showMenu->insertItem(i18n("&Window Icons"), WindowIcons); showMenu->insertItem(i18n("&Cycle on Wheel"), Cycle); + showMenu->insertItem(i18n("3&D Desk Borders"), Border3D); showMenu->insertTitle(i18n("Text Label")); showMenu->insertItem(i18n("Desktop N&umber"), @@ -767,6 +768,7 @@ void KMiniPager::aboutToShowContextMenu() m_contextMenu->setItemChecked(WindowThumbnails, m_settings->preview()); m_contextMenu->setItemChecked(WindowIcons, m_settings->icons()); m_contextMenu->setItemChecked(Cycle, m_settings->cycle()); + m_contextMenu->setItemChecked(Border3D, m_settings->border3D()); m_contextMenu->setItemEnabled(WindowIcons, m_settings->preview()); m_contextMenu->setItemEnabled(RenameDesktop, m_settings->labelType() == @@ -822,6 +824,9 @@ void KMiniPager::contextMenuActivated(int result) case Cycle: m_settings->setCycle(!m_settings->cycle()); break; + case Border3D: + m_settings->setBorder3D(!m_settings->border3D()); + break; case WindowIcons: m_settings->setIcons(!m_settings->icons()); break; diff --git a/kicker/applets/minipager/pagerapplet.h b/kicker/applets/minipager/pagerapplet.h index ceb5ec8f4..6433a6790 100644 --- a/kicker/applets/minipager/pagerapplet.h +++ b/kicker/applets/minipager/pagerapplet.h @@ -64,7 +64,7 @@ public: void setActive( WId active ) { m_activeWindow = active; } WId activeWindow() { return m_activeWindow; } - enum ConfigOptions { LaunchExtPager = 96, WindowThumbnails, Cycle, + enum ConfigOptions { LaunchExtPager = 96, WindowThumbnails, Cycle, Border3D, WindowIcons, ConfigureDesktops, RenameDesktop }; int labelType() const { return m_settings->labelType(); } @@ -73,6 +73,7 @@ public: bool desktopPreview() const { return m_settings->preview(); } bool cycleWindow() const { return m_settings->cycle(); } bool windowIcons() const { return m_settings->icons(); } + bool border3D() const { return m_settings->border3D(); } Orientation orientation() const { return KPanelApplet::orientation(); } diff --git a/kicker/applets/minipager/pagerbutton.cpp b/kicker/applets/minipager/pagerbutton.cpp index 6bd13ca3e..5c4bf71e8 100644 --- a/kicker/applets/minipager/pagerbutton.cpp +++ b/kicker/applets/minipager/pagerbutton.cpp @@ -400,47 +400,39 @@ void KMiniPagerButton::drawButton(TQPainter *bp) } } - if (!liveBkgnd) + // frame + if (liveBkgnd || transparent) { - if (transparent) + if (m_pager->border3D()) { - // transparent windows get an 1 pixel frame... - if (on) - { - bp->setPen(colorGroup().midlight()); - } - else if (down) - { - bp->setPen(KickerLib::blendColors(colorGroup().mid(), - colorGroup().midlight())); - } - else - { - bp->setPen(colorGroup().dark()); - } - - bp->drawRect(0, 0, w, h); + qDrawShadeRect(bp, 0, 0, w, h, on ? palette().active() : palette().inactive()); } else { - TQBrush background; - - if (on) - { - background = colorGroup().brush(TQColorGroup::Midlight); - } - else if (down) - { - background = TQBrush(KickerLib::blendColors(colorGroup().mid(), - colorGroup().midlight())); - } - else - { - background = colorGroup().brush(TQColorGroup::Mid); - } + bp->setPen(on ? colorGroup().midlight() + : KickerLib::blendColors(colorGroup().mid(), colorGroup().midlight())); + bp->drawRect(0, 0, w, h); + } + } + else + { + TQBrush background; - bp->fillRect(0, 0, w, h, background); + if (on) + { + background = colorGroup().brush(TQColorGroup::Midlight); + } + else if (down) + { + background = TQBrush(KickerLib::blendColors(colorGroup().mid(), + colorGroup().midlight())); } + else + { + background = colorGroup().brush(TQColorGroup::Mid); + } + + bp->fillRect(0, 0, w, h, background); } // window preview... @@ -495,22 +487,6 @@ void KMiniPagerButton::drawButton(TQPainter *bp) } } - if (liveBkgnd) - { - // draw a little border around the individual buttons - // makes it look a bit more finished. - if (on) - { - bp->setPen(colorGroup().midlight()); - } - else - { - bp->setPen(colorGroup().mid()); - } - - bp->drawRect(0, 0, w, h); - } - if (m_pager->labelType() != PagerSettings::EnumLabelType::LabelNone) { TQString label = (m_pager->labelType() == PagerSettings::EnumLabelType::LabelNumber) ? diff --git a/kicker/applets/minipager/pagersettings.kcfg b/kicker/applets/minipager/pagersettings.kcfg index 3a821f20a..11b6aa09d 100644 --- a/kicker/applets/minipager/pagersettings.kcfg +++ b/kicker/applets/minipager/pagersettings.kcfg @@ -49,15 +49,20 @@ <label>Show desktop preview?</label> <default>true</default> </entry> - + <entry name="Icons" type="Bool"> <label>Show window icons in previews?</label> <default>true</default> </entry> - + <entry name="Cycle" type="Bool"> <label>Cycle through desktops with wheel?</label> <default>true</default> </entry> + + <entry name="Border3D" type="Bool"> + <label>3D Desk border</label> + <default>false</default> + </entry> </group> </kcfg> |