Skip to content

Commit

Permalink
Tweak color theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDang committed Dec 31, 2020
1 parent 7c4f415 commit ade6919
Showing 1 changed file with 51 additions and 50 deletions.
101 changes: 51 additions & 50 deletions MasterWindow.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func NewMasterWindow(title string, width, height int, flags MasterWindowFlags, l
Context.renderer = r

mw := &MasterWindow{
clearColor: [4]float32{0.22, 0.26, 0.28, 1},
clearColor: [4]float32{0, 0, 0, 1},
width: width,
height: height,
title: title,
Expand All @@ -92,57 +92,58 @@ func (w *MasterWindow) setTheme() {
style := imgui.CurrentStyle()

imgui.PushStyleVarFloat(imgui.StyleVarWindowRounding, 2)
imgui.PushStyleVarFloat(imgui.StyleVarFrameRounding, 2)
imgui.PushStyleVarFloat(imgui.StyleVarFrameRounding, 4)
imgui.PushStyleVarFloat(imgui.StyleVarGrabRounding, 4)
imgui.PushStyleVarFloat(imgui.StyleVarFrameBorderSize, 1)

style.SetColor(imgui.StyleColorText, imgui.Vec4{X: 0.82, Y: 0.82, Z: 0.82, W: 1.00})
// style.SetColor(imgui.StyleColorTextDisabled, imgui.Vec4{})
style.SetColor(imgui.StyleColorWindowBg, imgui.Vec4{X: 0.22, Y: 0.26, Z: 0.28, W: 1.00})
// style.SetColor(imgui.StyleColorChildBg, imgui.Vec4{})
// style.SetColor(imgui.StyleColorPopupBg, imgui.Vec4{})
style.SetColor(imgui.StyleColorBorder, imgui.Vec4{X: 0.18, Y: 0.18, Z: 0.18, W: 1.00})
// style.SetColor(imgui.StyleColorBorderShadow, imgui.Vec4{})
style.SetColor(imgui.StyleColorFrameBg, imgui.Vec4{X: 0.20, Y: 0.23, Z: 0.24, W: 1.00})
style.SetColor(imgui.StyleColorFrameBgHovered, imgui.Vec4{X: 0.18, Y: 0.21, Z: 0.22, W: 1.00})
style.SetColor(imgui.StyleColorFrameBgActive, imgui.Vec4{X: 0.19, Y: 0.33, Z: 0.44, W: 1.00})
// style.SetColor(imgui.StyleColorTitleBg, imgui.Vec4{})
// style.SetColor(imgui.StyleColorTitleBgActive, imgui.Vec4{})
// style.SetColor(imgui.StyleColorTitleBgCollapsed, imgui.Vec4{})
// style.SetColor(imgui.StyleColorMenuBarBg, imgui.Vec4{})
style.SetColor(imgui.StyleColorScrollbarBg, imgui.Vec4{X: 0.20, Y: 0.23, Z: 0.24, W: 1.00})
style.SetColor(imgui.StyleColorScrollbarGrab, imgui.Vec4{X: 0.19, Y: 0.33, Z: 0.44, W: 1.00})
style.SetColor(imgui.StyleColorScrollbarGrabHovered, imgui.Vec4{X: 0.21, Y: 0.35, Z: 0.45, W: 1.00})
style.SetColor(imgui.StyleColorScrollbarGrabActive, imgui.Vec4{X: 0.23, Y: 0.36, Z: 0.47, W: 1.00})
// style.SetColor(imgui.StyleColorCheckMark, imgui.Vec4{})
style.SetColor(imgui.StyleColorSliderGrab, imgui.Vec4{X: 0.19, Y: 0.33, Z: 0.44, W: 1.00})
style.SetColor(imgui.StyleColorSliderGrabActive, imgui.Vec4{X: 0.23, Y: 0.36, Z: 0.47, W: 1.00})
style.SetColor(imgui.StyleColorButton, imgui.Vec4{X: 0.19, Y: 0.33, Z: 0.44, W: 1.00})
style.SetColor(imgui.StyleColorButtonHovered, imgui.Vec4{X: 0.23, Y: 0.36, Z: 0.47, W: 1.00})
style.SetColor(imgui.StyleColorButtonActive, imgui.Vec4{X: 0.25, Y: 0.38, Z: 0.49, W: 1.00})
// style.SetColor(imgui.StyleColorHeader, imgui.Vec4{})
// style.SetColor(imgui.StyleColorHeaderHovered, imgui.Vec4{})
// style.SetColor(imgui.StyleColorHeaderActive, imgui.Vec4{})
// style.SetColor(imgui.StyleColorSeparator, imgui.Vec4{})
// style.SetColor(imgui.StyleColorSeparatorHovered, imgui.Vec4{})
// style.SetColor(imgui.StyleColorSeparatorActive, imgui.Vec4{})
// style.SetColor(imgui.StyleColorResizeGrip, imgui.Vec4{})
// style.SetColor(imgui.StyleColorResizeGripHovered, imgui.Vec4{})
// style.SetColor(imgui.StyleColorResizeGripActive, imgui.Vec4{})
style.SetColor(imgui.StyleColorTab, imgui.Vec4{X: 0.20, Y: 0.23, Z: 0.24, W: 1.00})
style.SetColor(imgui.StyleColorTabHovered, imgui.Vec4{X: 0.23, Y: 0.36, Z: 0.47, W: 1.00})
style.SetColor(imgui.StyleColorTabActive, imgui.Vec4{X: 0.19, Y: 0.33, Z: 0.44, W: 1.00})
// style.SetColor(imgui.StyleColorTabUnfocused, imgui.Vec4{})
// style.SetColor(imgui.StyleColorTabUnfocusedActive, imgui.Vec4{})
// style.SetColor(imgui.StyleColorPlotLines, imgui.Vec4{})
// style.SetColor(imgui.StyleColorPlotLinesHovered, imgui.Vec4{})
// style.SetColor(imgui.StyleColorPlotHistogram, imgui.Vec4{})
// style.SetColor(imgui.StyleColorPlotHistogramHovered, imgui.Vec4{})
// style.SetColor(imgui.StyleColorTextSelectedBg, imgui.Vec4{})
// style.SetColor(imgui.StyleColorDragDropTarget, imgui.Vec4{})
// style.SetColor(imgui.StyleColorNavHighlight, imgui.Vec4{})
// style.SetColor(imgui.StyleColorNavWindowingHighlight, imgui.Vec4{})
// style.SetColor(imgui.StyleColorNavWindowingDarkening, imgui.Vec4{})
// style.SetColor(imgui.StyleColorModalWindowDarkening, imgui.Vec4{})
style.SetColor(imgui.StyleColorText, imgui.Vec4{X: 0.95, Y: 0.96, Z: 0.98, W: 1.00})
style.SetColor(imgui.StyleColorTextDisabled, imgui.Vec4{X: 0.36, Y: 0.42, Z: 0.47, W: 1.00})
style.SetColor(imgui.StyleColorWindowBg, imgui.Vec4{X: 0.11, Y: 0.15, Z: 0.17, W: 1.00})
style.SetColor(imgui.StyleColorChildBg, imgui.Vec4{X: 0.15, Y: 0.18, Z: 0.22, W: 1.00})
style.SetColor(imgui.StyleColorPopupBg, imgui.Vec4{X: 0.08, Y: 0.08, Z: 0.08, W: 0.94})
style.SetColor(imgui.StyleColorBorder, imgui.Vec4{X: 0.08, Y: 0.10, Z: 0.12, W: 1.00})
style.SetColor(imgui.StyleColorBorderShadow, imgui.Vec4{X: 0.00, Y: 0.00, Z: 0.00, W: 0.00})
style.SetColor(imgui.StyleColorFrameBg, imgui.Vec4{X: 0.20, Y: 0.25, Z: 0.29, W: 1.00})
style.SetColor(imgui.StyleColorFrameBgHovered, imgui.Vec4{X: 0.12, Y: 0.20, Z: 0.28, W: 1.00})
style.SetColor(imgui.StyleColorFrameBgActive, imgui.Vec4{X: 0.09, Y: 0.12, Z: 0.14, W: 1.00})
style.SetColor(imgui.StyleColorTitleBg, imgui.Vec4{X: 0.09, Y: 0.12, Z: 0.14, W: 0.65})
style.SetColor(imgui.StyleColorTitleBgActive, imgui.Vec4{X: 0.08, Y: 0.10, Z: 0.12, W: 1.00})
style.SetColor(imgui.StyleColorTitleBgCollapsed, imgui.Vec4{X: 0.00, Y: 0.00, Z: 0.00, W: 0.51})
style.SetColor(imgui.StyleColorMenuBarBg, imgui.Vec4{X: 0.15, Y: 0.18, Z: 0.22, W: 1.00})
style.SetColor(imgui.StyleColorScrollbarBg, imgui.Vec4{X: 0.02, Y: 0.02, Z: 0.02, W: 0.39})
style.SetColor(imgui.StyleColorScrollbarGrab, imgui.Vec4{X: 0.20, Y: 0.25, Z: 0.29, W: 1.00})
style.SetColor(imgui.StyleColorScrollbarGrabHovered, imgui.Vec4{X: 0.18, Y: 0.22, Z: 0.25, W: 1.00})
style.SetColor(imgui.StyleColorScrollbarGrabActive, imgui.Vec4{X: 0.09, Y: 0.21, Z: 0.31, W: 1.00})
style.SetColor(imgui.StyleColorCheckMark, imgui.Vec4{X: 0.28, Y: 0.56, Z: 1.00, W: 1.00})
style.SetColor(imgui.StyleColorSliderGrab, imgui.Vec4{X: 0.28, Y: 0.56, Z: 1.00, W: 1.00})
style.SetColor(imgui.StyleColorSliderGrabActive, imgui.Vec4{X: 0.37, Y: 0.61, Z: 1.00, W: 1.00})
style.SetColor(imgui.StyleColorButton, imgui.Vec4{X: 0.20, Y: 0.25, Z: 0.29, W: 1.00})
style.SetColor(imgui.StyleColorButtonHovered, imgui.Vec4{X: 0.28, Y: 0.56, Z: 1.00, W: 1.00})
style.SetColor(imgui.StyleColorButtonActive, imgui.Vec4{X: 0.06, Y: 0.53, Z: 0.98, W: 1.00})
style.SetColor(imgui.StyleColorHeader, imgui.Vec4{X: 0.20, Y: 0.25, Z: 0.29, W: 0.55})
style.SetColor(imgui.StyleColorHeaderHovered, imgui.Vec4{X: 0.26, Y: 0.59, Z: 0.98, W: 0.80})
style.SetColor(imgui.StyleColorHeaderActive, imgui.Vec4{X: 0.26, Y: 0.59, Z: 0.98, W: 1.00})
style.SetColor(imgui.StyleColorSeparator, imgui.Vec4{X: 0.20, Y: 0.25, Z: 0.29, W: 1.00})
style.SetColor(imgui.StyleColorSeparatorHovered, imgui.Vec4{X: 0.10, Y: 0.40, Z: 0.75, W: 0.78})
style.SetColor(imgui.StyleColorSeparatorActive, imgui.Vec4{X: 0.10, Y: 0.40, Z: 0.75, W: 1.00})
style.SetColor(imgui.StyleColorResizeGrip, imgui.Vec4{X: 0.26, Y: 0.59, Z: 0.98, W: 0.25})
style.SetColor(imgui.StyleColorResizeGripHovered, imgui.Vec4{X: 0.26, Y: 0.59, Z: 0.98, W: 0.67})
style.SetColor(imgui.StyleColorResizeGripActive, imgui.Vec4{X: 0.26, Y: 0.59, Z: 0.98, W: 0.95})
style.SetColor(imgui.StyleColorTab, imgui.Vec4{X: 0.11, Y: 0.15, Z: 0.17, W: 1.00})
style.SetColor(imgui.StyleColorTabHovered, imgui.Vec4{X: 0.26, Y: 0.59, Z: 0.98, W: 0.80})
style.SetColor(imgui.StyleColorTabActive, imgui.Vec4{X: 0.20, Y: 0.25, Z: 0.29, W: 1.00})
style.SetColor(imgui.StyleColorTabUnfocused, imgui.Vec4{X: 0.11, Y: 0.15, Z: 0.17, W: 1.00})
style.SetColor(imgui.StyleColorTabUnfocusedActive, imgui.Vec4{X: 0.11, Y: 0.15, Z: 0.17, W: 1.00})
style.SetColor(imgui.StyleColorPlotLines, imgui.Vec4{X: 0.61, Y: 0.61, Z: 0.61, W: 1.00})
style.SetColor(imgui.StyleColorPlotLinesHovered, imgui.Vec4{X: 1.00, Y: 0.43, Z: 0.35, W: 1.00})
style.SetColor(imgui.StyleColorPlotHistogram, imgui.Vec4{X: 0.90, Y: 0.70, Z: 0.00, W: 1.00})
style.SetColor(imgui.StyleColorPlotHistogramHovered, imgui.Vec4{X: 1.00, Y: 0.60, Z: 0.00, W: 1.00})
style.SetColor(imgui.StyleColorTextSelectedBg, imgui.Vec4{X: 0.26, Y: 0.59, Z: 0.98, W: 0.35})
style.SetColor(imgui.StyleColorDragDropTarget, imgui.Vec4{X: 1.00, Y: 1.00, Z: 0.00, W: 0.90})
style.SetColor(imgui.StyleColorNavHighlight, imgui.Vec4{X: 0.26, Y: 0.59, Z: 0.98, W: 1.00})
style.SetColor(imgui.StyleColorNavWindowingHighlight, imgui.Vec4{X: 1.00, Y: 1.00, Z: 1.00, W: 0.70})
style.SetColor(imgui.StyleColorNavWindowingDarkening, imgui.Vec4{X: 0.80, Y: 0.80, Z: 0.80, W: 0.20})
style.SetColor(imgui.StyleColorModalWindowDarkening, imgui.Vec4{X: 0.80, Y: 0.80, Z: 0.80, W: 0.35})

scale := w.platform.GetContentScale()

Expand Down

0 comments on commit ade6919

Please sign in to comment.