EDIT:
Thread turned into feature request.
"maybe there should be an option for the scrollbar to attach to the outside of a window? This might involve the stuff in viewtopic.php?f=1&t=4859; I dunno."
Check this out:
http://img375.imageshack.us/i/hardcoded15px.png/
It seems the total allotted clearance is 15.
I was making a scrollbar yesterday night and today. I have as of yet been unable to make it look correct without reducing the scrollbar size to 15.
I can't find this number, but it seems that the 15 is somehow hard-coded somewhere.
If anyone would like to check the bug, just make a scrollbar with a size over 15 (or just modify the width/height of a Taharez scrollbar to 16+) and you'll see, I think, that it will not expand the clearance.
scrollbar feature request!
Moderators: CEGUI MVP, CEGUI Team
scrollbar feature request!
Last edited by agamemnus on Wed Jul 21, 2010 15:20, edited 1 time in total.
Re: Scrollbar height clearance is hardcoded?
When you say "just modify the width/height of a scrollbar to 16+" do you mean in the size of the images in the imageset or actual dimensions in the looknfeel?
Looking at the looknfeel (http://crayzedsgui.svn.sourceforge.net/ ... iew=markup) I don't see anything hard coded there... maybe its in the source or image set somewhere that its set to 15. Can't play with it here, but when I get home maybe I'll poke around
Looking at the looknfeel (http://crayzedsgui.svn.sourceforge.net/ ... iew=markup) I don't see anything hard coded there... maybe its in the source or image set somewhere that its set to 15. Can't play with it here, but when I get home maybe I'll poke around

Re: Scrollbar height clearance is hardcoded?
I mean the dimensions in the looknfeel (in scrollablepane). Well, it depends on the scrollbar implementation. The scrollbar implementation must resize its elements according to the scrollbar height for this to work, but that requires a very particular implementation. Still, the elements should resize mostly OK in TaharezLook.
It doesn't have to do with the images themselves since my scrollbar is a completely different image from TaharezLook.tga.
I think it's hard coded in the source, but I can't tell how exactly. There's no obvious "15" in the source that does this.
It doesn't have to do with the images themselves since my scrollbar is a completely different image from TaharezLook.tga.
I think it's hard coded in the source, but I can't tell how exactly. There's no obvious "15" in the source that does this.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Scrollbar height clearance is hardcoded?
Sizes and other such aspects are not hard coded, that can be freely specified in the looknfeel XML.
CE
CE
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Scrollbar height clearance is hardcoded?
What, then, is the clearance parameter?
I can assure you that there's nothing in either the scrollbar thumb, horizontal scrollbar, or scrollable pane that indicates a clearance of "15". (I set the size of the scrollbar itself in the scrollable pane to 15, though... anything more and it gets cut off at the bottom)
Scrollbar:
http://img688.imageshack.us/img688/9206/scrollbar.png
I can assure you that there's nothing in either the scrollbar thumb, horizontal scrollbar, or scrollable pane that indicates a clearance of "15". (I set the size of the scrollbar itself in the scrollable pane to 15, though... anything more and it gets cut off at the bottom)
Code: Select all
<!--
***************************************************
TaharezLook/HorizontalScrollbarThumb
***************************************************
-->
<WidgetLook name="TaharezLook/HorizontalScrollbarThumb">
<Property name="HorzFree" value="True" />
<ImagerySection name="normal">
<FrameComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
</Area>
<Image type="LeftEdge" imageset="scrollbar" image="horzScrollThumbLeftNormal" />
<Image type="RightEdge" imageset="scrollbar" image="horzScrollThumbRightNormal" />
<Image type="Background" imageset="scrollbar" image="horzScrollThumbMiddleNormal" />
</FrameComponent>
</ImagerySection>
<ImagerySection name="hover">
<FrameComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
</Area>
<Image type="LeftEdge" imageset="scrollbar" image="horzScrollThumbLeftHover" />
<Image type="RightEdge" imageset="scrollbar" image="horzScrollThumbRightHover" />
<Image type="Background" imageset="scrollbar" image="horzScrollThumbMiddleHover" />
</FrameComponent>
</ImagerySection>
<StateImagery name="Normal">
<Layer>
<Section section="normal" />
</Layer>
</StateImagery>
<StateImagery name="Hover">
<Layer>
<Section section="hover" />
</Layer>
</StateImagery>
<StateImagery name="Pushed">
<Layer>
<Section section="normal" />
</Layer>
</StateImagery>
<StateImagery name="Disabled">
<Layer>
<Section section="normal">
<Colors topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
</Layer>
</StateImagery>
</WidgetLook>
<!--
***************************************************
TaharezLook/HorizontalScrollbar
***************************************************
-->
<WidgetLook name="TaharezLook/HorizontalScrollbar">
<NamedArea name="ThumbTrackArea">
<Area>
<Dim type="LeftEdge" ><ImageDim imageset="scrollbar" image="horzScrollThumbMiddleNormal" dimension="Width" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge" >
<UnifiedDim scale="1.0" type="RightEdge">
<DimOperator op="Subtract">
<ImageDim imageset="scrollbar" image="horzScrollThumbMiddleNormal" dimension="Width" />
</DimOperator>
</UnifiedDim>
</Dim>
<Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim>
</Area>
</NamedArea>
<Child type="TaharezLook/ImageButton" nameSuffix="__auto_decbtn__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><ImageDim imageset="scrollbar" image="horzScrollLeftNormal" dimension="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<Property name="normalImage" value="set:scrollbar image:horzScrollLeftNormal" />
<Property name="hoverImage" value="set:scrollbar image:horzScrollLeftHover" />
<Property name="pushedImage" value="set:scrollbar image:horzScrollLeftNormal" />
</Child>
<Child type="TaharezLook/ImageButton" nameSuffix="__auto_incbtn__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><ImageDim imageset="scrollbar" image="horzScrollRightNormal" dimension="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<HorzAlignment type="RightAligned" />
<Property name="normalImage" value="set:scrollbar image:horzScrollRightNormal" />
<Property name="hoverImage" value="set:scrollbar image:horzScrollRightHover" />
<Property name="pushedImage" value="set:scrollbar image:horzScrollRightNormal" />
</Child>
<Child type="TaharezLook/HorizontalScrollbarThumb" nameSuffix="__auto_thumb__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="0.1" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<Property name="UnifiedMinSize" value="{{0, 5},{0,0}}" />
</Child>
<ImagerySection name="main">
<ImageryComponent>
<Area>
<Dim type="LeftEdge" ><ImageDim imageset="scrollbar" image="horzScrollLeftNormal" dimension="Width" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge" >
<UnifiedDim scale="1.0" type="RightEdge">
<DimOperator op="Subtract">
<ImageDim imageset="scrollbar" image="horzScrollRightNormal" dimension="Width"/>
</DimOperator>
</UnifiedDim>
</Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<Image imageset="scrollbar" image="horzScrollSegment" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
</ImagerySection>
<StateImagery name="Enabled">
<Layer>
<Section section="main" />
</Layer>
</StateImagery>
<StateImagery name="Disabled">
<Layer>
<Section section="main">
<Colors topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
</Layer>
</StateImagery>
</WidgetLook>
<!--
***************************************************
TaharezLook/ScrollablePane
***************************************************
-->
<WidgetLook name="TaharezLook/ScrollablePane">
<NamedArea name="ViewableArea">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge" ><UnifiedDim scale="1.0" type="RightEdge" /></Dim>
<Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge"/></Dim>
</Area>
</NamedArea>
<NamedArea name="ViewableAreaHScroll">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge" ><UnifiedDim scale="1.0" type="RightEdge" /></Dim>
<Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge"/></Dim>
</Area>
</NamedArea>
<NamedArea name="ViewableAreaVScroll">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge" ><UnifiedDim scale="1.0" type="RightEdge" /></Dim>
<Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge"/></Dim>
</Area>
</NamedArea>
<NamedArea name="ViewableAreaHVScroll">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge" ><UnifiedDim scale="1.0" type="RightEdge" /></Dim>
<Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge"/></Dim>
</Area>
</NamedArea>
<Child type="TaharezLook/HorizontalScrollbar" nameSuffix="__auto_hscrollbar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><UnifiedDim scale="1" offset="-15" type="Height"/></Dim>
<Dim type="RightEdge" ><UnifiedDim scale="1" offset="0" type="Width" /></Dim>
<Dim type="BottomEdge" ><UnifiedDim scale="1" offset="0" type="Height" /></Dim>
</Area>
<Property name="NonClient" value="True" />
</Child>
<Child type="TaharezLook/VerticalScrollbar" nameSuffix="__auto_vscrollbar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><UnifiedDim scale="1" offset="0" type="Height"/></Dim>
<Dim type="RightEdge" ><UnifiedDim scale="1" offset="-15" type="Width" /></Dim>
<Dim type="BottomEdge" ><UnifiedDim scale="1" offset="0" type="Height" /></Dim>
</Area>
<HorzAlignment type="RightAligned" />
<Property name="NonClient" value="True" />
</Child>
<StateImagery name="Enabled" />
<StateImagery name="Disabled" />
</WidgetLook>
Code: Select all
<Imageset Name="scrollbar" Imagefile="scrollbar.png" NativeHorzRes="800" NativeVertRes="600" AutoScaled="false" AntiAlias="false">
<Image Name="horzScrollSegment" XPos="21" YPos="0" Width="10" Height="18" />
<Image Name="horzScrollThumbLeftNormal" XPos="0" YPos="18" Width="5" Height="18"/>
<Image Name="horzScrollThumbMiddleNormal" XPos="5" YPos="18" Width="16" Height="18"/>
<Image Name="horzScrollThumbRightNormal" XPos="21" YPos="18" Width="5" Height="18"/>
<Image Name="horzScrollThumbLeftHover" XPos="26" YPos="18" Width="5" Height="18"/>
<Image Name="horzScrollThumbMiddleHover" XPos="31" YPos="18" Width="16" Height="18"/>
<Image Name="horzScrollThumbRightHover" XPos="47" YPos="18" Width="5" Height="18"/>
<Image Name="horzScrollLeftHover" XPos="0" YPos="0" Width="21" Height="18"/>
<Image Name="horzScrollRightHover" XPos="31" YPos="0" Width="21" Height="18"/>
<Image Name="horzScrollLeftNormal" XPos="0" YPos="0" Width="21" Height="18" />
<Image Name="horzScrollRightNormal" XPos="31" YPos="0" Width="21" Height="18" />
</Imageset>
Scrollbar:
http://img688.imageshack.us/img688/9206/scrollbar.png
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Scrollbar height clearance is hardcoded?
Well, you have those -15 bits in the scrollbar child defs for the scrollable pane, so presumably it's related to that?
CE
CE
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Scrollbar height clearance is hardcoded?
CrazyEddie wrote:Well, you have those -15 bits in the scrollbar child defs for the scrollable pane, so presumably it's related to that?
CE
No, that's not it, but I figured it out...
I had gotten wrapped up in the scrollablePane, but I didn't realize that the scrollbar getting attached won't resize anything it is attached to... the scrollablePane parent has a size of 90 and the windows have a size of 75... the clearance is 15!
Oof, my bad..
Still, I guess I can salvage this thread and turn this into a feature request.. maybe there should be an option for the scrollbar to attach to the outside of a window?

This might involve the stuff in viewtopic.php?f=1&t=4859; I dunno.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: scrollbar feature request!
The way this is / should be handled is that the inner rect / content area / client area(s) get defined in such a way that they correctly exclude active scrollbars (so for scrollable pane, you have all those ViewableArea[[H|V]Scroll] NamedArea definitions. The scrollbars are marked as NonClient, and it's job done.
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Bug Reports, Suggestions, Feature Requests”
Who is online
Users browsing this forum: No registered users and 8 guests