button spacing in list? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12) +--- Thread: button spacing in list? (/showthread.php?tid=363793) |
button spacing in list? - darthgamer64 - 2021-08-01 OK im getting further but for the life of me, I cant seem to reduce the spacing without losing my buttons. Any help please? I looked everywhere and cant seem to find many options. I tried to reduce the height size from 95 to 45 but then the button itself shrinks down <itemlayout height="95"> <control type="button"> <control type="image"> <left>0</left> <top>0</top> <texture colordiffuse="button_focus">lists/focus.png</texture> <animation effect="fade" start="100" end="0" time="0" condition="[!Control.HasFocus(9000) + !ControlGroup(700).HasFocus] | System.HasActiveModalDialog">Conditional</animation> </control> </control> <control type="label"> <left>104</left> <top>0</top> <height>95</height> <width>560</width> <aligny>center</aligny> <font>font37</font> <label>$INFO[ListItem.Label]</label> <texture colordiffuse="button_focus">lists/focus.png</texture> <shadowcolor>text_shadow</shadowcolor> </control> </itemlayout> RE: button spacing in list? - ontap - 2021-08-01 You need to put the size of your image in the button/image code , for example you have the "item layout" height at 95, lets say you wanted the gap between buttons to be 10 , add the height as 90, you may have to tweak left and top to get it how you want it.Then obviously do same with "focused item layout ". <control type="button"> <control type="image"> <height>90</height> <width>?</width> <left>0</left> <top>0</top> <texture colordiffuse="button_focus">lists/focus.png</texture> <animation effect="fade" start="100" end="0" time="0" condition="[!Control.HasFocus(9000) + !ControlGroup(700).HasFocus] | System.HasActiveModalDialog">Conditional</animation> </control> RE: button spacing in list? - darthgamer64 - 2021-08-01 (2021-08-01, 21:00)ontap Wrote: You need to put the size of your image in the button/image code , for example you have the "item layout" height at 95, lets say you wanted the gap between buttons to be 10 , add the height as 90, you may have to tweak left and top to get it how you want it.Then obviously do same with "focused item layout ".So thats the problem I'm running into. I removed it in case but I also added it back and played around with the image height but it didnt do anything, it still manages to keep that gap even when increasing & increasing the height. is there a setting somewhere else that controls this gap? RE: button spacing in list? - darthgamer64 - 2021-08-01 could this be an issue? I'm having trouble trying to find this but idk if it makes an impact or not <control type="group"> <depth>DepthContentPanel</depth> <include>OpenClose_Left</include> <control type="list" id="9000"> <left>75</left> <top>315</top> <width>462</width> <bottom>-10</bottom> <movement>5</movement> <focusposition>0</focusposition> <onfocus>ClearProperty(listposition,home)</onfocus> <onright>SetFocus($INFO[Container(9000).ListItem.Property(menu_id)])</onright> <onup>700</onup> <ondown>700</ondown> <!--<scrolltime tween="cubic" easing="out">500</scrolltime>--> <!-- what it looks like when selected --> <focusedlayout height="95"> RE: button spacing in list? - ontap - 2021-08-01 No, if your issue is the height between lit items as in your pic , then you can adjust it by doing what I suggested . RE: button spacing in list? - ontap - 2021-08-01 (2021-08-01, 21:26)darthgamer64 Wrote: could this be an issue? I'm having trouble trying to find this but idk if it makes an impact or notThe list in your last pic should be in "home.xml" RE: button spacing in list? - darthgamer64 - 2021-08-01 Figured it out, I had to add the "height" property within the "button" parent, not image. Really appreciate it tho, so simple but didnt know where to start <control type="button"> <height>95</height> <control type="image"> <left>1</left> RE: button spacing in list? - ronie - 2021-08-01 perhaps too obvious, but have you checked the image you're using (lists/focus.png) is fully solid and does not contain a transparent border? RE: button spacing in list? - Hitcher - 2021-08-02 Why are you using a button? You just need the image/label. RE: button spacing in list? - moshep15 - 2021-08-02 (2021-08-02, 01:14)Hitcher Wrote: Why are you using a button? You just need the image/label. yes because buttons dont work inside containers RE: button spacing in list? - scott967 - 2021-08-03 (2021-08-02, 06:58)moshep15 Wrote:I guess the alternative is to use a grouplist control instead.(2021-08-02, 01:14)Hitcher Wrote: Why are you using a button? You just need the image/label. scott s. . RE: button spacing in list? - moshep15 - 2021-08-03 (2021-08-03, 02:08)scott967 Wrote:(2021-08-02, 06:58)moshep15 Wrote:I guess the alternative is to use a grouplist control instead.(2021-08-02, 01:14)Hitcher Wrote: Why are you using a button? You just need the image/label. RE: button spacing in list? - moshep15 - 2021-08-03 basicly container also can be good idea using items <control type="list" id="9000"> <left>75</left> <top>315</top> <width>462</width> <bottom>-10</bottom> <movement>5</movement> <orientation>vertical</orientation> <focusposition>0</focusposition> <itemlayout height"140"> <control type="image"> <posx>0</posx> <posy>0</posy> <width>150</width> <height>40</height> <texture>black.png</texture> <colordiffuse>77000000</colordiffuse> </control> <control type="label"> <posx>0</posx> <posy>0</posy> <width>150</width> <height>40</height> <align>center</align> <aligny>center</aligny> <label>$INFO[ListItem.Label]</label> </control> </itemlayout> <focusedlayout height="140"> <control type="image"> <posx>0</posx> <posy>0</posy> <width>150</width> <height>40</height> <texture>black.png</texture> <colordiffuse>77000000</colordiffuse> </control> <control type="image"> <!!---this is the focuseditem --!!> <posx>0</posx> <posy>0</posy> <width>150</width> <height>40</height> <texture colordiffuse="gray">white.png</texture> </control> <control type="label"> <posx>0</posx> <posy>0</posy> <width>150</width> <height>40</height> <align>center</align> <aligny>center</aligny> <label>$INFO[ListItem.Label]</label> </control> </focusedlayout> <content> <item> <label>movies</label> <onclick>your path</onclick> </item> </content> </control> |