[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    Change shape of GtkScale with CSS for GTK < 3.20 and > 3.20
From:       Cyril Richard <cyril.richard42 () gmail ! com>
Date:       2018-05-02 12:55:35
Message-ID: CACaCH2m_Uq+uK1iPXPYtyO-gAsQP5KUn_Z3Cx3aqwthvGM5KVA () mail ! gmail ! com
[Download RAW message or body]

Hi,

I am trying to change the shape of a GTKScale. To do it I use a CSS sheet.
The following CSS code gives something's good, like in attachment.

.midtone-scale {
    background-image: -gtk-gradient(linear, left top, right top,
from(black),
        to(shade(white, 0.95)));
    padding: 5px;
}

.midtone-scale trough,
.midtone-scale highlight,
.midtone-scale trough:disabled {
    border-image: none;
    border-style: none;
    border-width: 0px;
    border-radius: 0px;
    background-color: transparent;
}

.midtone-scale slider,
.midtone-scale slider:hover,
.midtone-scale slider:disabled {
    border-radius: 0px;
    border-style: none;
    background-color: transparent;
    box-shadow: none;
    min-width: 21px;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: top;
    background-image: url("pixmaps/scale-slider-horz.png");
}

But, for GTK version less than 3.20 it does not work. Please, could you
help me to write a CSS sheet working for both ?
Or maybe there's a better way to change the shape like I want ?
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic