Skip to content

Commit ed2a27d

Browse files
committed
debugui: use a transparent color for collapsed titles
1 parent db88bdf commit ed2a27d

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

container.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,11 @@ func (c *Context) doWindow(title string, bounds image.Rectangle, opt option, id
132132
if (^opt & optionNoTitle) != 0 {
133133
tr := bounds
134134
tr.Max.Y = tr.Min.Y + c.style().titleHeight
135-
c.drawFrame(tr, colorTitleBG)
135+
if !collapsed {
136+
c.drawFrame(tr, colorTitleBG)
137+
} else {
138+
c.drawFrame(tr, colorTitleBGTransparent)
139+
}
136140

137141
// do title text
138142
if (^opt & optionNoTitle) != 0 {

style.go

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const (
2323
colorBorder
2424
colorWindowBG
2525
colorTitleBG
26+
colorTitleBGTransparent
2627
colorTitleText
2728
colorPanelBG
2829
colorButton
@@ -45,19 +46,20 @@ var defaultStyle style = style{
4546
scrollbarSize: 12,
4647
thumbSize: 8,
4748
colors: [...]color.RGBA{
48-
colorText: {230, 230, 230, 255},
49-
colorBorder: {25, 25, 25, 255},
50-
colorWindowBG: {45, 45, 45, 230},
51-
colorTitleBG: {23, 23, 23, 230},
52-
colorTitleText: {240, 240, 240, 255},
53-
colorPanelBG: {0, 0, 0, 0},
54-
colorButton: {75, 75, 75, 255},
55-
colorButtonHover: {95, 95, 95, 255},
56-
colorButtonFocus: {115, 115, 115, 255},
57-
colorBase: {30, 30, 30, 255},
58-
colorBaseHover: {35, 35, 35, 255},
59-
colorBaseFocus: {40, 40, 40, 255},
60-
colorScrollBase: {43, 43, 43, 255},
61-
colorScrollThumb: {30, 30, 30, 255},
49+
colorText: {230, 230, 230, 255},
50+
colorBorder: {25, 25, 25, 255},
51+
colorWindowBG: {45, 45, 45, 230},
52+
colorTitleBG: {30, 30, 30, 255},
53+
colorTitleBGTransparent: {20, 20, 20, 204},
54+
colorTitleText: {240, 240, 240, 255},
55+
colorPanelBG: {0, 0, 0, 0},
56+
colorButton: {75, 75, 75, 255},
57+
colorButtonHover: {95, 95, 95, 255},
58+
colorButtonFocus: {115, 115, 115, 255},
59+
colorBase: {30, 30, 30, 255},
60+
colorBaseHover: {35, 35, 35, 255},
61+
colorBaseFocus: {40, 40, 40, 255},
62+
colorScrollBase: {43, 43, 43, 255},
63+
colorScrollThumb: {30, 30, 30, 255},
6264
},
6365
}

0 commit comments

Comments
 (0)