Add color highlight menu (#11044)

This commit is contained in:
Rowan Decker
2024-08-30 13:10:43 -07:00
committed by GitHub
parent 89fdb5516b
commit 60e0e3ef45
10 changed files with 303 additions and 37 deletions

View File

@@ -67,11 +67,14 @@ function CheckButton:initCheckButton(checked)
show_parent = self.show_parent or self,
}
end
local fgcolor = self.fgcolor or Blitbuffer.COLOR_BLACK
self._textwidget = TextBoxWidget:new{
text = self.text,
face = self.face,
width = (self.width or self.parent:getAddedWidgetAvailableWidth()) - self._checkmark.dimen.w,
fgcolor = self.enabled and Blitbuffer.COLOR_BLACK or Blitbuffer.COLOR_DARK_GRAY,
bold = self.bold,
fgcolor = self.enabled and fgcolor or Blitbuffer.COLOR_DARK_GRAY,
bgcolor = self.bgcolor,
}
local textbox_shift = math.max(0, self._checkmark.baseline - self._textwidget:getBaseline())
self._verticalgroup = VerticalGroup:new{