ConfigDialog: fix some gray mismatch in prev commit (#4797)

Remove gray underline on text items (font size items).
Adjust gray color of ButtonProgressWidget to match the
one of ToggleSwitch (just need to invert it, as it's
used to select button, which cause this color to be
inverted).
pull/4799/head
poire-z 5 years ago committed by GitHub
parent 2011cf1ad1
commit 9560bc2061
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -75,7 +75,9 @@ function ButtonProgressWidget:update()
if self.thin_grey_style then
button.frame.color = Blitbuffer.COLOR_DARK_GRAY -- no black border around gray squares
if highlighted then
button.frame.background = Blitbuffer.COLOR_DARK_GRAY
-- The button and its frame background will be inverted,
-- so invert the color we want so it gets inverted back
button.frame.background = Blitbuffer.COLOR_DARK_GRAY:invert()
button = FrameContainer:new{ -- add margin back
margin = button_margin,
padding = 0,

@ -391,7 +391,7 @@ function ConfigOption:init()
underline_padding = padding_button,
padding_left = d > 1 and horizontal_half_padding,
padding_right = d < #self.options[c].item_text and horizontal_half_padding,
color = d == current_item and enabled and Blitbuffer.COLOR_BLACK or Blitbuffer.COLOR_DARK_GRAY or Blitbuffer.COLOR_WHITE,
color = d == current_item and (enabled and Blitbuffer.COLOR_BLACK or Blitbuffer.COLOR_DARK_GRAY) or Blitbuffer.COLOR_WHITE,
enabled = enabled,
}
else
@ -410,7 +410,7 @@ function ConfigOption:init()
underline_padding = -padding_button,
padding_left = d > 1 and horizontal_half_padding,
padding_right = d < #self.options[c].item_text and horizontal_half_padding,
color = d == current_item and enabled and Blitbuffer.COLOR_BLACK or Blitbuffer.COLOR_DARK_GRAY or Blitbuffer.COLOR_WHITE,
color = d == current_item and (enabled and Blitbuffer.COLOR_BLACK or Blitbuffer.COLOR_DARK_GRAY) or Blitbuffer.COLOR_WHITE,
enabled = enabled,
}
end
@ -448,7 +448,7 @@ function ConfigOption:init()
underline_padding = -padding_button,
padding_left = d > 1 and horizontal_half_padding,
padding_right = d < #self.options[c].item_icons and horizontal_half_padding,
color = d == current_item and enabled and Blitbuffer.COLOR_BLACK or Blitbuffer.COLOR_DARK_GRAY or Blitbuffer.COLOR_WHITE,
color = d == current_item and (enabled and Blitbuffer.COLOR_BLACK or Blitbuffer.COLOR_DARK_GRAY) or Blitbuffer.COLOR_WHITE,
enabled = enabled,
}
option_items[d] = option_item

Loading…
Cancel
Save