@@ -10,7 +10,7 @@ local images_path = script_path .. 'Images/'
1010-- Load fonts
1111---- -------------------------------------------------------------------
1212
13- local font = reaper .ImGui_CreateFont (fonts_path .. ' Inter.ttc' , fontSize )
13+ font = reaper .ImGui_CreateFont (fonts_path .. ' Inter.ttc' , fontSize )
1414local fontBigger = reaper .ImGui_CreateFont (fonts_path .. ' Inter.ttc' , fontSize + 4 )
1515local fontSmall = reaper .ImGui_CreateFont (fonts_path .. ' Inter.ttc' , fontSize - 1 )
1616reaper .ImGui_Attach (ctx , font )
@@ -56,6 +56,26 @@ local function stepSprite(on,odd, accent)
5656end
5757local cellW ,cellH = images .Step_odd_off .w , images .Step_odd_off .h
5858
59+ local buttonColor = 0x2f2f34ff
60+ local activeButtonColor = 0x576065ff
61+ local slideBackgroundColor = 0x060607ff
62+
63+ function pushToolbarStyles (ctx )
64+ reaper .ImGui_PushStyleVar (ctx , reaper .ImGui_StyleVar_FramePadding (), 4 , 4 )
65+ reaper .ImGui_PushStyleColor (ctx , reaper .ImGui_Col_SliderGrab (), buttonColor )
66+ reaper .ImGui_PushStyleColor (ctx , reaper .ImGui_Col_SliderGrabActive (), activeButtonColor )
67+ reaper .ImGui_PushStyleColor (ctx , reaper .ImGui_Col_FrameBg (), slideBackgroundColor )
68+ reaper .ImGui_PushStyleColor (ctx , reaper .ImGui_Col_FrameBgHovered (), slideBackgroundColor )
69+ reaper .ImGui_PushStyleColor (ctx , reaper .ImGui_Col_FrameBgActive (), slideBackgroundColor )
70+ reaper .ImGui_PushStyleColor (ctx , reaper .ImGui_Col_Button (), buttonColor )
71+ reaper .ImGui_PushStyleColor (ctx , reaper .ImGui_Col_ButtonHovered (), buttonColor )
72+ reaper .ImGui_PushStyleColor (ctx , reaper .ImGui_Col_ButtonActive (), activeButtonColor )
73+ end
74+
75+ function popToolbarStyles (ctx )
76+ reaper .ImGui_PopStyleColor (ctx , 8 )
77+ reaper .ImGui_PopStyleVar (ctx , 1 )
78+ end
5979
6080function drawSlider (ctx , label , value , minVal , maxVal ,
6181 width )
@@ -67,6 +87,7 @@ function drawSlider(ctx, label, value, minVal, maxVal,
6787 reaper .ImGui_PushItemWidth (ctx , width )
6888 reaper .ImGui_PushFont (ctx , fontSmall )
6989
90+
7091 local changed , newVal = reaper .ImGui_SliderInt (ctx , label , value , minVal , maxVal )
7192
7293 reaper .ImGui_PopItemWidth (ctx )
0 commit comments