Skip to content

Commit

Permalink
Forward port [15458].
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinecellerier committed Apr 30, 2006
1 parent ebda535 commit e3aa4d0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/skins/skins2-howto.xml
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ difficulty to understand how VLC skins work.</para>
</sect4>
<sect4 id="textscrolling">
<title>scrolling</title>
<para>Scrolling behaviour of the text (only when it doesn't fit in the <link linkend="textwidth">width</link> of the control). Possible values are 'auto', 'manual' and 'none'. If this attribute is set to 'auto', the text automatically starts scrolling. The user can drag the text, and click on it to start/stop the scrolling. If this attribute is set to 'manual', the text only scrolls when dragged by the user. If this attribute is set to 'none', no scrolling is possible at all. Available since VLC 0.8.5.</para>
<para>Scrolling behaviour of the text (only when it doesn't fit in the <link linkend="textwidth">width</link> of the control). Possible values are 'auto', 'autooff', 'manual' and 'none'. If this attribute is set to 'auto', the text automatically starts scrolling. The user can drag the text, and click on it to start/stop the scrolling. If this attribute is set to 'manual', the text only scrolls when dragged by the user. If this attribute is set to 'none', no scrolling is possible at all. Available since VLC 0.8.5.</para>
<para>Default value: auto</para>
</sect4>
</sect3>
Expand Down
2 changes: 1 addition & 1 deletion modules/gui/skins2/controls/ctrl_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CtrlText::CtrlText( intf_thread_t *pIntf, VarText &rVariable,
&m_cmdManualStill );
m_fsm.addTransition( "manual1", "motion", "manual1", &m_cmdMove );
}
else if( m_scrollMode == kAutomatic )
else if( m_scrollMode == kAutomatic || m_scrollMode == kAutomaticOff )
{
m_fsm.addTransition( "still", "mouse:left:down", "manual1",
&m_cmdToManual );
Expand Down
2 changes: 2 additions & 0 deletions modules/gui/skins2/controls/ctrl_text.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class CtrlText: public CtrlGeneric, public Observer<VarText, void*>
// width of the control. The user can still stop it or make it
// scroll manually with the mouse.
kAutomatic,
// Same as above butt default state is off
kAutomaticOff,
// Only manual scrolling is allowed (with the mouse)
kManual,
// No scrolling of the text is allowed
Expand Down
2 changes: 2 additions & 0 deletions modules/gui/skins2/parser/builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,8 @@ void Builder::addText( const BuilderData::Text &rData )
CtrlText::Scrolling_t scrolling;
if( rData.m_scrolling == "auto" )
scrolling = CtrlText::kAutomatic;
else if( rData.m_scrolling == "autooff" )
scrolling = CtrlText::kAutomaticOff;
else if( rData.m_scrolling == "manual" )
scrolling = CtrlText::kManual;
else if( rData.m_scrolling == "none" )
Expand Down
6 changes: 3 additions & 3 deletions share/skins2/default/theme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@
<Button x="408" y="2" up="close_up" over="close_over" down="close_down" lefttop="righttop" rightbottom="righttop" action="vlc.quit()" tooltiptext="Quit VLC"/>


<Text x="21" y="207" alignment="left" color="#FFFFFF" font="mainfont" lefttop="leftbottom" rightbottom="rightbottom" width="320" text="$N" visible="not dvd.isActive"/>
<Text x="21" y="207" alignment="left" color="#FFFFFF" font="mainfont" lefttop="leftbottom" rightbottom="rightbottom" width="320" text="$N" visible="not dvd.isActive" scrolling="autooff"/>

<Text x="125" y="207" alignment="left" color="#FFFFFF" font="mainfont" lefttop="leftbottom" rightbottom="rightbottom" width="215" text="$N" visible="dvd.isActive"/>
<Text x="125" y="207" alignment="left" color="#FFFFFF" font="mainfont" lefttop="leftbottom" rightbottom="rightbottom" width="215" text="$N" visible="dvd.isActive" scrolling="autooff"/>
<Text x="342" y="208" alignment="right" color="#FFFFFF" font="defaultfont" lefttop="rightbottom" rightbottom="rightbottom" width="88" text="$T/$D"/>
<Button x="21" y="207" up="dvd_prevtitle" action="dvd.previousTitle()" tooltiptext="Play Previous Title on DVD" lefttop="leftbottom" rightbottom="rightbottom" visible="dvd.isActive"/>
<Button x="41" y="207" up="dvd_prevchapter" action="dvd.previousChapter()" tooltiptext="Go to Previous Chapter of Title" lefttop="leftbottom" rightbottom="rightbottom" visible="dvd.isActive"/>
Expand Down Expand Up @@ -342,7 +342,7 @@
<Anchor x="300" y="0" priority="3"/>
<Image x="0" y="0" action="move" image="minimal_bg"/>

<Text x="10" y="20" alignment="left" color="#FFFFFF" font="mainfont" text="$N" width="190"/>
<Text x="10" y="20" alignment="left" color="#FFFFFF" font="mainfont" text="$N" width="190" scrolling="autooff"/>
<Text x="202" y="21" alignment="right" color="#FFFFFF" font="defaultfont" text="$T/$D" width="88"/>
<Slider x="10" y="42" points="(5,0),(275,0)" up="timeslider" value="time" tooltiptext="$T / $D"/>

Expand Down

0 comments on commit e3aa4d0

Please sign in to comment.