]> git.sesse.net Git - vlc/commit
skins2: implement a new 'focus' attribute for text control
authorErwan Tulou <erwan10@videolan.org>
Sat, 11 Dec 2010 10:56:14 +0000 (11:56 +0100)
committerErwan Tulou <erwan10@videolan.org>
Sat, 11 Dec 2010 14:24:33 +0000 (15:24 +0100)
commit81717b48cdb23df13c3ca31bd2c5b881ec39e8f4
tree8c282104587a91863f0510efab2e04edbac313ea
parentf4266f31d19938935306af292b1e9c2cf89596f6
skins2: implement a new 'focus' attribute for text control

Up to now, text control could but be focusable, and this focus was used
to scroll text, should it be too long for full display.

From a user viewpoint, this behavior is often counterintuitive :
 - Most of the time, the control is designed to fit the text anyway, and
   scrolling is not expected.
 - On the other hand, an underlying control may be used to move the window
   (for instance, the title bar), and a text control is expected not to
   interact in this endeavor. Same goes for popupmenu, that is expected
   to work if one happens to right-click on a text control.

This patch adds a 'focus' attribute to the text control, and leave it to the
skins developper to decide which behavior is most desirable on a per-control
basis. focus still defaults to true to maintain skins current behavior.
doc/skins/skins2-howto.xml
modules/gui/skins2/controls/ctrl_text.cpp
modules/gui/skins2/controls/ctrl_text.hpp
modules/gui/skins2/parser/builder.cpp
modules/gui/skins2/parser/builder_data.def
modules/gui/skins2/parser/builder_data.hpp
modules/gui/skins2/parser/skin_parser.cpp
share/skins2/skin.dtd