From e6a725a855208bccab349c6265c6d99af65ecc42 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 9 Nov 2015 12:45:10 -0500 Subject: A couple changes to Lumina: 1) Add 3 different "view modes" for applications in the start menu: Alphabetical (no categories), Partial Categories (same as before - still on list though), or Categories (need to click the category to go into it and see the applications).2) Fix the theming of partially checked checkboxes and groupboxes. 3) Force the desktop icons to have black text in the theme (no matter which color scheme is in use). 4) Adjust the outlining effects of the desktop icons to use a radial gradient now, so you get a smoother effect which does not steal eye focus as much on contrasting backgrounds. --- .../desktop-plugins/applauncher/OutlineToolButton.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lumina-desktop/desktop-plugins/applauncher/OutlineToolButton.h') diff --git a/lumina-desktop/desktop-plugins/applauncher/OutlineToolButton.h b/lumina-desktop/desktop-plugins/applauncher/OutlineToolButton.h index 68540292..4d7206ee 100644 --- a/lumina-desktop/desktop-plugins/applauncher/OutlineToolButton.h +++ b/lumina-desktop/desktop-plugins/applauncher/OutlineToolButton.h @@ -71,11 +71,11 @@ protected: QColor textC = opt.palette.text().color().toHsl(); //need the lightness value in a moment QColor outC = textC; //qDebug() << "Font Color Values:" << textC << textC.lightness() << textC.lightnessF(); - if(textC.lightnessF() > 0.5){ outC.setHsl(textC.hue(), textC.hslSaturation(), 0, 110); } - else{outC.setHsl(textC.hue(), textC.hslSaturation(), 255, 110); } + if(textC.lightnessF() > 0.5){ outC.setHsl(textC.hue(), textC.hslSaturation(), 0, 90); } + else{outC.setHsl(textC.hue(), textC.hslSaturation(), 255, 90); } //qDebug() << "Outline Color Values:" << outC; //Now get the size of the outline border (need to scale for high-res monitors) - qreal OWidth = opt.fontMetrics.width("o")/3.0; + qreal OWidth = opt.fontMetrics.width("o")/3.5; //qDebug() << "Outline Width:" << OWidth; //Now generate a QPainterPath for the text QPainterPath path; @@ -85,8 +85,11 @@ protected: } path.setFillRule(Qt::WindingFill); //Now paint the text + QRadialGradient RG(box.center(), box.width()/1.1); //width is always going to be greater than height + RG.setColorAt(0, outC); + RG.setColorAt(1, Qt::transparent); p.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing); //need antialiasing for this to work well (sub-pixel painting) - p.strokePath(path, QPen(QBrush(outC),OWidth, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin) ); //This will be the outline - 1pixel thick, semi-transparent + p.strokePath(path, QPen(QBrush(RG),OWidth, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin) ); //This will be the outline - 1pixel thick, semi-transparent p.fillPath(path, QBrush(textC)); //this will be the inside/text color } -- cgit