Adwaita: support rtl on text handles

Just use the opposite variant for the opposite LTR side.
This commit is contained in:
Carlos Garnacho 2015-06-10 20:54:09 +02:00
parent fc6871b43b
commit cd5f70357c
3 changed files with 75 additions and 39 deletions

View File

@ -1586,19 +1586,19 @@ column-header.button.dnd { // for treeview-like derive widgets
@each $s,$as in ('',''), @each $s,$as in ('',''),
(':hover','-hover'), (':hover','-hover'),
(':active','-active') { //no need for insensitive and backdrop (':active','-active') { //no need for insensitive and backdrop
&.top#{$s} { &.top#{$s}:dir(ltr), &.bottom#{$s}:dir(rtl) {
$_url: 'assets/text-select-start#{$as}#{$asset_suffix}'; $_url: 'assets/text-select-start#{$as}#{$asset_suffix}';
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'), -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
url('#{$_url}@2.png')); url('#{$_url}@2.png'));
padding-left: 10px; padding-left: 10px;
} }
&.bottom#{$s} { &.bottom#{$s}:dir(ltr), &.top#{$s}:dir(rtl) {
$_url: 'assets/text-select-end#{$as}#{$asset_suffix}'; $_url: 'assets/text-select-end#{$as}#{$asset_suffix}';
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'), -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
url('#{$_url}@2.png')); url('#{$_url}@2.png'));
padding-right: 10px; padding-right: 10px;
} }
&.insertion-cursor#{$s} { &.insertion-cursor#{$s}:dir(ltr), &.insertion-cursor#{$s}:dir(rtl) {
$_url: 'assets/slider-horz-scale-has-marks-above#{$as}#{$asset_suffix}'; $_url: 'assets/slider-horz-scale-has-marks-above#{$as}#{$asset_suffix}';
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'), -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
url('#{$_url}@2.png')); url('#{$_url}@2.png'));

View File

@ -2059,38 +2059,56 @@ column-header .titlebar .button.titlebutton,
background-image: none; background-image: none;
box-shadow: none; box-shadow: none;
border-style: none; } border-style: none; }
.entry.cursor-handle.top, .entry.cursor-handle.top:dir(ltr),
.cursor-handle.top { .cursor-handle.top:dir(ltr),
.entry.cursor-handle.bottom:dir(rtl),
.cursor-handle.bottom:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/text-select-start-dark.png"), url("assets/text-select-start-dark@2.png")); -gtk-icon-source: -gtk-scaled(url("assets/text-select-start-dark.png"), url("assets/text-select-start-dark@2.png"));
padding-left: 10px; } padding-left: 10px; }
.entry.cursor-handle.bottom, .entry.cursor-handle.bottom:dir(ltr),
.cursor-handle.bottom { .cursor-handle.bottom:dir(ltr),
.entry.cursor-handle.top:dir(rtl),
.cursor-handle.top:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/text-select-end-dark.png"), url("assets/text-select-end-dark@2.png")); -gtk-icon-source: -gtk-scaled(url("assets/text-select-end-dark.png"), url("assets/text-select-end-dark@2.png"));
padding-right: 10px; } padding-right: 10px; }
.entry.cursor-handle.insertion-cursor, .entry.cursor-handle.insertion-cursor:dir(ltr),
.cursor-handle.insertion-cursor { .entry.cursor-handle.insertion-cursor:dir(rtl),
.cursor-handle.insertion-cursor:dir(ltr),
.cursor-handle.insertion-cursor:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/slider-horz-scale-has-marks-above-dark.png"), url("assets/slider-horz-scale-has-marks-above-dark@2.png")); } -gtk-icon-source: -gtk-scaled(url("assets/slider-horz-scale-has-marks-above-dark.png"), url("assets/slider-horz-scale-has-marks-above-dark@2.png")); }
.entry.cursor-handle.top:hover, .entry.cursor-handle.top:hover:dir(ltr),
.cursor-handle.top:hover { .cursor-handle.top:hover:dir(ltr),
.entry.cursor-handle.bottom:hover:dir(rtl),
.cursor-handle.bottom:hover:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/text-select-start-hover-dark.png"), url("assets/text-select-start-hover-dark@2.png")); -gtk-icon-source: -gtk-scaled(url("assets/text-select-start-hover-dark.png"), url("assets/text-select-start-hover-dark@2.png"));
padding-left: 10px; } padding-left: 10px; }
.entry.cursor-handle.bottom:hover, .entry.cursor-handle.bottom:hover:dir(ltr),
.cursor-handle.bottom:hover { .cursor-handle.bottom:hover:dir(ltr),
.entry.cursor-handle.top:hover:dir(rtl),
.cursor-handle.top:hover:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/text-select-end-hover-dark.png"), url("assets/text-select-end-hover-dark@2.png")); -gtk-icon-source: -gtk-scaled(url("assets/text-select-end-hover-dark.png"), url("assets/text-select-end-hover-dark@2.png"));
padding-right: 10px; } padding-right: 10px; }
.entry.cursor-handle.insertion-cursor:hover, .entry.cursor-handle.insertion-cursor:hover:dir(ltr),
.cursor-handle.insertion-cursor:hover { .entry.cursor-handle.insertion-cursor:hover:dir(rtl),
.cursor-handle.insertion-cursor:hover:dir(ltr),
.cursor-handle.insertion-cursor:hover:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/slider-horz-scale-has-marks-above-hover-dark.png"), url("assets/slider-horz-scale-has-marks-above-hover-dark@2.png")); } -gtk-icon-source: -gtk-scaled(url("assets/slider-horz-scale-has-marks-above-hover-dark.png"), url("assets/slider-horz-scale-has-marks-above-hover-dark@2.png")); }
.entry.cursor-handle.top:active, .entry.cursor-handle.top:active:dir(ltr),
.cursor-handle.top:active { .cursor-handle.top:active:dir(ltr),
.entry.cursor-handle.bottom:active:dir(rtl),
.cursor-handle.bottom:active:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/text-select-start-active-dark.png"), url("assets/text-select-start-active-dark@2.png")); -gtk-icon-source: -gtk-scaled(url("assets/text-select-start-active-dark.png"), url("assets/text-select-start-active-dark@2.png"));
padding-left: 10px; } padding-left: 10px; }
.entry.cursor-handle.bottom:active, .entry.cursor-handle.bottom:active:dir(ltr),
.cursor-handle.bottom:active { .cursor-handle.bottom:active:dir(ltr),
.entry.cursor-handle.top:active:dir(rtl),
.cursor-handle.top:active:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/text-select-end-active-dark.png"), url("assets/text-select-end-active-dark@2.png")); -gtk-icon-source: -gtk-scaled(url("assets/text-select-end-active-dark.png"), url("assets/text-select-end-active-dark@2.png"));
padding-right: 10px; } padding-right: 10px; }
.entry.cursor-handle.insertion-cursor:active, .entry.cursor-handle.insertion-cursor:active:dir(ltr),
.cursor-handle.insertion-cursor:active { .entry.cursor-handle.insertion-cursor:active:dir(rtl),
.cursor-handle.insertion-cursor:active:dir(ltr),
.cursor-handle.insertion-cursor:active:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/slider-horz-scale-has-marks-above-active-dark.png"), url("assets/slider-horz-scale-has-marks-above-active-dark@2.png")); } -gtk-icon-source: -gtk-scaled(url("assets/slider-horz-scale-has-marks-above-active-dark.png"), url("assets/slider-horz-scale-has-marks-above-active-dark@2.png")); }
/***************** /*****************

View File

@ -2065,38 +2065,56 @@ column-header .titlebar .button.titlebutton,
background-image: none; background-image: none;
box-shadow: none; box-shadow: none;
border-style: none; } border-style: none; }
.entry.cursor-handle.top, .entry.cursor-handle.top:dir(ltr),
.cursor-handle.top { .cursor-handle.top:dir(ltr),
.entry.cursor-handle.bottom:dir(rtl),
.cursor-handle.bottom:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/text-select-start.png"), url("assets/text-select-start@2.png")); -gtk-icon-source: -gtk-scaled(url("assets/text-select-start.png"), url("assets/text-select-start@2.png"));
padding-left: 10px; } padding-left: 10px; }
.entry.cursor-handle.bottom, .entry.cursor-handle.bottom:dir(ltr),
.cursor-handle.bottom { .cursor-handle.bottom:dir(ltr),
.entry.cursor-handle.top:dir(rtl),
.cursor-handle.top:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/text-select-end.png"), url("assets/text-select-end@2.png")); -gtk-icon-source: -gtk-scaled(url("assets/text-select-end.png"), url("assets/text-select-end@2.png"));
padding-right: 10px; } padding-right: 10px; }
.entry.cursor-handle.insertion-cursor, .entry.cursor-handle.insertion-cursor:dir(ltr),
.cursor-handle.insertion-cursor { .entry.cursor-handle.insertion-cursor:dir(rtl),
.cursor-handle.insertion-cursor:dir(ltr),
.cursor-handle.insertion-cursor:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/slider-horz-scale-has-marks-above.png"), url("assets/slider-horz-scale-has-marks-above@2.png")); } -gtk-icon-source: -gtk-scaled(url("assets/slider-horz-scale-has-marks-above.png"), url("assets/slider-horz-scale-has-marks-above@2.png")); }
.entry.cursor-handle.top:hover, .entry.cursor-handle.top:hover:dir(ltr),
.cursor-handle.top:hover { .cursor-handle.top:hover:dir(ltr),
.entry.cursor-handle.bottom:hover:dir(rtl),
.cursor-handle.bottom:hover:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/text-select-start-hover.png"), url("assets/text-select-start-hover@2.png")); -gtk-icon-source: -gtk-scaled(url("assets/text-select-start-hover.png"), url("assets/text-select-start-hover@2.png"));
padding-left: 10px; } padding-left: 10px; }
.entry.cursor-handle.bottom:hover, .entry.cursor-handle.bottom:hover:dir(ltr),
.cursor-handle.bottom:hover { .cursor-handle.bottom:hover:dir(ltr),
.entry.cursor-handle.top:hover:dir(rtl),
.cursor-handle.top:hover:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/text-select-end-hover.png"), url("assets/text-select-end-hover@2.png")); -gtk-icon-source: -gtk-scaled(url("assets/text-select-end-hover.png"), url("assets/text-select-end-hover@2.png"));
padding-right: 10px; } padding-right: 10px; }
.entry.cursor-handle.insertion-cursor:hover, .entry.cursor-handle.insertion-cursor:hover:dir(ltr),
.cursor-handle.insertion-cursor:hover { .entry.cursor-handle.insertion-cursor:hover:dir(rtl),
.cursor-handle.insertion-cursor:hover:dir(ltr),
.cursor-handle.insertion-cursor:hover:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/slider-horz-scale-has-marks-above-hover.png"), url("assets/slider-horz-scale-has-marks-above-hover@2.png")); } -gtk-icon-source: -gtk-scaled(url("assets/slider-horz-scale-has-marks-above-hover.png"), url("assets/slider-horz-scale-has-marks-above-hover@2.png")); }
.entry.cursor-handle.top:active, .entry.cursor-handle.top:active:dir(ltr),
.cursor-handle.top:active { .cursor-handle.top:active:dir(ltr),
.entry.cursor-handle.bottom:active:dir(rtl),
.cursor-handle.bottom:active:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/text-select-start-active.png"), url("assets/text-select-start-active@2.png")); -gtk-icon-source: -gtk-scaled(url("assets/text-select-start-active.png"), url("assets/text-select-start-active@2.png"));
padding-left: 10px; } padding-left: 10px; }
.entry.cursor-handle.bottom:active, .entry.cursor-handle.bottom:active:dir(ltr),
.cursor-handle.bottom:active { .cursor-handle.bottom:active:dir(ltr),
.entry.cursor-handle.top:active:dir(rtl),
.cursor-handle.top:active:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/text-select-end-active.png"), url("assets/text-select-end-active@2.png")); -gtk-icon-source: -gtk-scaled(url("assets/text-select-end-active.png"), url("assets/text-select-end-active@2.png"));
padding-right: 10px; } padding-right: 10px; }
.entry.cursor-handle.insertion-cursor:active, .entry.cursor-handle.insertion-cursor:active:dir(ltr),
.cursor-handle.insertion-cursor:active { .entry.cursor-handle.insertion-cursor:active:dir(rtl),
.cursor-handle.insertion-cursor:active:dir(ltr),
.cursor-handle.insertion-cursor:active:dir(rtl) {
-gtk-icon-source: -gtk-scaled(url("assets/slider-horz-scale-has-marks-above-active.png"), url("assets/slider-horz-scale-has-marks-above-active@2.png")); } -gtk-icon-source: -gtk-scaled(url("assets/slider-horz-scale-has-marks-above-active.png"), url("assets/slider-horz-scale-has-marks-above-active@2.png")); }
/***************** /*****************