diff options
author | Ken Moore <moorekou@gmail.com> | 2015-11-09 12:45:10 -0500 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-11-09 12:45:10 -0500 |
commit | e6a725a855208bccab349c6265c6d99af65ecc42 (patch) | |
tree | 397fd3c232108c329997462d45327e5c4d1fa4ef /lumina-desktop/desktop-plugins/applauncher | |
parent | Add the WM_PROTOCOLS ICCCM support to the lumina library. (diff) | |
download | lumina-e6a725a855208bccab349c6265c6d99af65ecc42.tar.gz lumina-e6a725a855208bccab349c6265c6d99af65ecc42.tar.bz2 lumina-e6a725a855208bccab349c6265c6d99af65ecc42.zip |
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.
Diffstat (limited to 'lumina-desktop/desktop-plugins/applauncher')
-rw-r--r-- | lumina-desktop/desktop-plugins/applauncher/OutlineToolButton.h | 11 |
1 files changed, 7 insertions, 4 deletions
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 } |