win32 theme: Query theme borders when rendering buttons
If someone figures out where the remaining pixel comes from: Tell me!
This commit is contained in:
committed by
Benjamin Otte
parent
67b893c5f8
commit
01bcda8a8c
@ -286,33 +286,44 @@ radio:indeterminate:disabled {
|
|||||||
/* Buttons */
|
/* Buttons */
|
||||||
|
|
||||||
button {
|
button {
|
||||||
background-color: transparent;
|
|
||||||
background-image: -gtk-win32-theme-part(button, 1, 1);
|
background-image: -gtk-win32-theme-part(button, 1, 1);
|
||||||
border-width: 0;
|
padding-top: calc(1px + -gtk-win32-part-border-top(button, 1, 1));
|
||||||
padding: 3px;
|
padding-right: calc(1px + -gtk-win32-part-border-right(button, 1, 1));
|
||||||
|
padding-bottom: calc(1px + -gtk-win32-part-border-bottom(button, 1, 1));
|
||||||
|
padding-left: calc(1px + -gtk-win32-part-border-left(button, 1, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button.default {
|
||||||
|
background-image: -gtk-win32-theme-part(button, 1, 5);
|
||||||
|
padding-top: calc(1px + -gtk-win32-part-border-top(button, 1, 5));
|
||||||
|
padding-right: calc(1px + -gtk-win32-part-border-right(button, 1, 5));
|
||||||
|
padding-bottom: calc(1px + -gtk-win32-part-border-bottom(button, 1, 5));
|
||||||
|
padding-left: calc(1px + -gtk-win32-part-border-left(button, 1, 5));
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background-image: -gtk-win32-theme-part(button, 1, 2);
|
||||||
|
padding-top: calc(1px + -gtk-win32-part-border-top(button, 1, 2));
|
||||||
|
padding-right: calc(1px + -gtk-win32-part-border-right(button, 1, 2));
|
||||||
|
padding-bottom: calc(1px + -gtk-win32-part-border-bottom(button, 1, 2));
|
||||||
|
padding-left: calc(1px + -gtk-win32-part-border-left(button, 1, 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
button:active, button:checked {
|
||||||
|
background-image: -gtk-win32-theme-part(button, 1, 3);
|
||||||
|
padding-top: calc(1px + -gtk-win32-part-border-top(button, 1, 3));
|
||||||
|
padding-right: calc(1px + -gtk-win32-part-border-right(button, 1, 3));
|
||||||
|
padding-bottom: calc(1px + -gtk-win32-part-border-bottom(button, 1, 3));
|
||||||
|
padding-left: calc(1px + -gtk-win32-part-border-left(button, 1, 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* XXX: Figure out how to handle disabled active togglebuttons */
|
||||||
button:disabled {
|
button:disabled {
|
||||||
background-image: -gtk-win32-theme-part(button, 1, 4);
|
background-image: -gtk-win32-theme-part(button, 1, 4);
|
||||||
}
|
padding-top: calc(1px + -gtk-win32-part-border-top(button, 1, 4));
|
||||||
|
padding-right: calc(1px + -gtk-win32-part-border-right(button, 1, 4));
|
||||||
button:focus {
|
padding-bottom: calc(1px + -gtk-win32-part-border-bottom(button, 1, 4));
|
||||||
background-image: -gtk-win32-theme-part(button, 1, 5);
|
padding-left: calc(1px + -gtk-win32-part-border-left(button, 1, 4));
|
||||||
}
|
|
||||||
|
|
||||||
button:hover, button:hover:focus {
|
|
||||||
background-image: -gtk-win32-theme-part(button, 1, 2);
|
|
||||||
color: @text_color;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:active, button:active:focus, button:active:focus:hover {
|
|
||||||
background-image: -gtk-win32-theme-part(button, 1, 3);
|
|
||||||
color: @text_color;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Override *:selected { ...} style; affects horizontalbuttons */
|
|
||||||
button:selected {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scrollbars */
|
/* Scrollbars */
|
||||||
|
|||||||
Reference in New Issue
Block a user