From 10e41144596fc9ced40fc349d9ecd099b1c2ea19 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 11 Dec 2009 20:21:27 +0000 Subject: Initial import of Trinity 3.5.11 to kdebase Extends krandrtray, adds iccconfig kcontrol module, adds run dialog autocomplete and lots of bugfixes Will need to check for commit warnings and repair as encountered Also needs full compile test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1061475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kicker/libkicker/kickerSettings.kcfg | 5 +++++ kicker/libkicker/panelbutton.cpp | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'kicker/libkicker') diff --git a/kicker/libkicker/kickerSettings.kcfg b/kicker/libkicker/kickerSettings.kcfg index 42f02bcad..7e6f76366 100644 --- a/kicker/libkicker/kickerSettings.kcfg +++ b/kicker/libkicker/kickerSettings.kcfg @@ -275,6 +275,11 @@ i18n("Applications") + + + QString("kmenu") + + diff --git a/kicker/libkicker/panelbutton.cpp b/kicker/libkicker/panelbutton.cpp index f53d4b38f..407a78ca6 100644 --- a/kicker/libkicker/panelbutton.cpp +++ b/kicker/libkicker/panelbutton.cpp @@ -29,6 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include +#include #include #include @@ -39,6 +40,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include +#include #include #include #include @@ -289,10 +291,11 @@ int PanelButton::widthForHeight(int height) const if (orientation() == Horizontal && !m_buttonText.isEmpty()) { QFont f(font()); - f.setPixelSize(KMIN(height, KMAX(int(float(height) * m_fontPercent), 16))); + //f.setPixelSize(KMIN(height, KMAX(int(float(height) * m_fontPercent), 16))); QFontMetrics fm(f); - rc += fm.width(m_buttonText) + KMIN(25, KMAX(5, fm.width('m') / 2)); + //rc += fm.width(m_buttonText) + KMIN(25, KMAX(5, fm.width('m') / 2)); + rc += fm.width(m_buttonText); } return rc; @@ -348,7 +351,7 @@ bool PanelButton::hasText() const void PanelButton::setButtonText(const QString& text) { - m_buttonText = text; + m_buttonText = " " + text; update(); } @@ -489,6 +492,9 @@ void PanelButton::mouseReleaseEvent(QMouseEvent *e) if (e->button() == LeftButton) { m_isLeftMouseButtonDown = false; + + QPixmap pix = labelIcon(); + KIconEffect::visualActivate(this, this->geometry(), &pix); } QButton::mouseReleaseEvent(e); } @@ -569,7 +575,7 @@ void PanelButton::drawButtonLabel(QPainter *p) { fontPercent *= .8; } - f.setPixelSize(KMIN(h, KMAX(int(float(h) * m_fontPercent), 16))); + //f.setPixelSize(KMIN(h, KMAX(int(float(h) * m_fontPercent), 16))); QFontMetrics fm(f); p->setFont(f); -- cgit v1.2.1