#1 Le 20/09/2013, à 21:16
- Compte anonymisé
[Résolu]Faire un bouton identique GTK3 comme GTK2
Bonsoir,
Je viens vers car je n'y arrive pas totalement. Je bidouille mais je n'y comprend pas grand chose ou si peu.
J'ai réussi à sortir l'effet de mon bouton en GTK2 mais voilà malgré tout mes efforts, j'approche à peu près pour celui en GTK3 mais tout à fait. Mis a part le radius que je ne veux pas, il me manque la brillance. Je ne connais pas le code qu'il faudrait insérer.
Je vous poste le code du GTK2 et celui du GTK3 ainsi que le style obtenu pour l'instant sur le GTK3. Si une âme charitable passe par là, cela serait super s'il pouvait m'aider. Merci par avance.
Le code le fichier gtkrc du GTK2 :
style "button" {
xthickness = 3
ythickness = 3
bg[NORMAL] = shade (0.26, "#A9744B") ########### COULEUR DU BOUTON
bg[PRELIGHT] = shade (0.36, "#A9744B")
bg[ACTIVE] = shade (0.86, "#232323") # Enclenché
bg[SELECTED] = shade (1.00, "#A9744B") #
bg[INSENSITIVE] = shade (0.26, "#687478")
fg[NORMAL] = shade (0.95, @fg_color)
engine "murrine" {
contrast = 0.85
gradient_shades = {2.15,7.07,1.08,1.05} ######## Le 1.07 Si 7.07 ÇA FAIT DU CHROME #####################
border_shades = {8.10, 0.95}
lightborderstyle = 1 # 0 = top side, 1 = all sides
lightborder_shade = 1.1
highlight_shade = 1.03
roundness = 3
focusstyle = 0
glowstyle = 4 # 0 = top, 1 = bottom, 2 = top and bottom, 3 = horizontal, 4 = centered glow
glow_shade = 5.25 # DONNER DU RELIEF LUMINEUX 5.25 OU 9.25
reliefstyle = 3
textstyle = 1
text_shade = 1.1
}
}
Le fichier gtk-widgets.css du GTK3
C'est ici que j'aimerais de l'aide:
.notebook tab {
-GtkWidget-focus-line-width: 5px;
border-radius: 0;
border-width: 1px 0px 0px 0px;
color: #232323;
background-image: -gtk-gradient (linear,left top,left bottom,
color-stop(0.0,rgba(148,125,105,0.2)),
color-stop(0.50,rgba(219,200,184,0.9)),
color-stop(0.51,rgba(242,219,201,0.9)),
color-stop(1.00,rgba(100,86,76,0.2)));
}
.notebook tab:active {
-GtkWidget-focus-line-width: 5px;
border-radius: 0;
border-width: 2px 0px 0px 0px;
color: #232323;
background-image: -gtk-gradient (linear,left top,left bottom,
color-stop(0.0,rgba(148,125,105,0.2)),
color-stop(0.50,rgba(219,200,184,0.9)),
color-stop(0.51,rgba(242,219,201,0.9)),
color-stop(1.00,rgba(100,86,76,0.2)));
}
Dernière modification par Compte anonymisé (Le 01/04/2017, à 22:02)