button spacing in list?
#1
OK im getting further but for the life of me, I cant seem to reduce the spacing without losing my buttons. Any help please? Wink 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>

Image
ImageImageImage
Reply
#2
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>
Reply
#3
(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 ".
<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>
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?
Reply
#4
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">
Reply
#5
No, if your issue is the height between lit items as in your pic , then you can adjust it by doing what I suggested .
Reply
#6
(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 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">
The list in your last pic should be in "home.xml"
Reply
#7
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>
Reply
#8
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?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#9
Why are you using a button? You just need the image/label.
Reply
#10
(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
Reply
#11
(2021-08-02, 06:58)moshep15 Wrote:
(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
I guess the alternative is to use a grouplist control instead.

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix see: Aeon MQ5 Mod Matrix release thread
Nexus see: Aeon MQ5 Mod Nexus release thread
Aeon MQ 5 skin and addon repo 11.1.0
Reply
#12
(2021-08-03, 02:08)scott967 Wrote:
(2021-08-02, 06:58)moshep15 Wrote:
(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
I guess the alternative is to use a grouplist control instead.

scott s.
.
Reply
#13
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>
Reply

Logout Mark Read Team Forum Stats Members Help
button spacing in list?0