@@ -47,21 +47,20 @@ local function InitializeControls(window)
4747 lblClock = Label :New {name = ' lblClock' , caption = ' Clock' , width = 45 , height = 26 , textColor = TEXT_COLOR }
4848 trackbarVolume = Trackbar :New {
4949 tooltip = ' Volume' ,
50- height = 16 , -- 12,
51- width = sliderWidth - 25 ,
50+ height = 16 ,
51+ width = sliderWidth ,
5252 trackColor = TEXT_COLOR ,
5353 value = spGetConfigInt (" snd_volmaster" , 50 ),
5454 OnChange = {
5555 function (self )
5656 spSetConfigInt (" snd_volmaster" , self .value )
57- -- spSendCommands{"set snd_volmaster " .. self.value}
5857 end
5958 },
6059 }
6160 trackbarMusic = Trackbar :New {
6261 tooltip = ' Music' ,
63- height = 16 , -- 12,
64- width = sliderWidth - 25 ,
62+ height = 16 ,
63+ width = sliderWidth ,
6564 min = 0 ,
6665 max = 1 ,
6766 step = 0.01 ,
@@ -89,13 +88,13 @@ local function InitializeControls(window)
8988-- parent = window,
9089 }
9190 local gridVolume = Grid :New {
92- height = 32 , -- 24 ,
93- width = sliderWidth , -- - 25,
91+ height = ' 100% ' ,
92+ width = sliderWidth + 25 ,
9493 columns = 2 ,
9594 rows = 2 ,
9695 resizeItems = false ,
9796 margin = {0 , 0 , 0 , 0 },
98- padding = {0 , 0 , 0 , 0 }, -- {0, -2, 0, 0},
97+ padding = {0 , 0 , 0 , 0 },
9998 itemPadding = {0 , 0 , 0 , 0 },
10099 itemMargin = {0 , 0 , 0 , 0 },
101100 children = {imageVolume , trackbarVolume , imageMusic , trackbarMusic },
@@ -111,50 +110,11 @@ local function InitializeControls(window)
111110 resizeItems = false ,
112111 autoArrangeV = false ,
113112 autoArrangeH = false ,
114- padding = {0 , 2 , 0 , 0 },
115- itemMargin = {1 , 0 , 0 , 0 },
116- children = {stackClock , gridVolume },
113+ padding = {0 , 0 , 0 , 0 },
114+ itemMargin = {0 , 0 , 0 , 0 },
115+ children = {gridVolume , stackClock },
117116 parent = window ,
118117 }
119- -- local stackChildren = {}
120- -- local holderWidth = 6
121- -- if width > 435 then
122- -- stackChildren[#stackChildren + 1] = stackClock
123- -- holderWidth = holderWidth + 64
124- -- end
125- ---- stackChildren[#stackChildren + 1] = imageVolume
126- -- stackChildren[#stackChildren + 1] = gridVolume
127- -- holderWidth = holderWidth + sliderWidth + 2
128- --
129- -- local mainPanel = Panel:New{
130- -- y = 0,
131- -- right = 0,
132- -- bottom = 0,
133- ---- clientWidth = holderWidth,
134- -- backgroundColor = INVISIBLE_COLOR,
135- -- color = INVISIBLE_COLOR,
136- -- margin = {0, 0, 0, 0},
137- -- padding = {0, 0, 3, 6},
138- -- parent = window,
139- --
140- -- children = {
141- -- StackPanel:New{
142- -- name = 'stack_main',
143- -- orientation = 'horizontal',
144- -- width = '100%',
145- -- height = '100%',
146- -- resizeItems = false,
147- -- padding = {0, 0, 0, 0},
148- -- itemPadding = {1, 1, 1, 1},
149- -- itemMargin = {1, 1, 1, 1},
150- -- autoArrangeV = false,
151- -- autoArrangeH = false,
152- --
153- -- children = stackChildren,
154- ---- children = {stackClock, gridVolume},
155- -- }
156- -- }
157- -- }
158118end
159119
160120
0 commit comments