Add spinbox SVG buttons, but use a definition draw for now

Change-Id: Iff40c7c315ed2473e7a5bd84a6449aedcf646e2f
Reviewed-on: https://gerrit.libreoffice.org/68753
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
Tomaž Vajngerl 2019-02-19 14:38:49 +01:00 committed by Tomaž Vajngerl
parent 67b6b526dd
commit 07cb5f46a1
5 changed files with 34 additions and 1 deletions

View File

@ -23,6 +23,8 @@ $(eval $(call gb_Package_add_files,vcl_theme_definitions,$(LIBO_SHARE_FOLDER)/th
tick-on.svgx \
tick-on-pressed.svgx \
tick-on-disabled.svgx \
spinbox-left.svgx \
spinbox-right.svgx \
))
# vim: set noet sw=4 ts=4:

View File

@ -534,7 +534,7 @@ bool FileDefinitionWidgetDraw::getNativeControlRegion(
{
case ControlType::Spinbox:
{
Size aButtonSize(44, 26);
Size aButtonSize(32, 32);
Point aLocation(rBoundingControlRegion.TopLeft());
if (ePart == ControlPart::ButtonUp)

View File

@ -140,6 +140,29 @@
</part>
</editbox>
<spinbox>
<part value="Entire">
<state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
<rect stroke="#007AFF" fill="#FFFFFF" stroke-width="1" rx="5" ry="5" margin="0"/>
</state>
</part>
<part value="ButtonDown">
<state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
<rect stroke="#007AFF" fill="#FFFFFF" stroke-width="1" rx="5" ry="5" margin="0"/>
<line stroke="#007AFF" stroke-width="2" x1="0.4" y1="0.5" x2="0.6" y2="0.5"/>
<!-- <image source="spinbox-left.svgx" /> -->
</state>
</part>
<part value="ButtonUp">
<state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
<rect stroke="#007AFF" fill="#FFFFFF" stroke-width="1" rx="5" ry="5" margin="0"/>
<line stroke="#007AFF" stroke-width="2" x1="0.4" y1="0.5" x2="0.6" y2="0.5"/>
<line stroke="#007AFF" stroke-width="2" x1="0.5" y1="0.4" x2="0.5" y2="0.6"/>
<!-- <image source="spinbox-right.svgx" /> -->
</state>
</part>
</spinbox>
<scrollbar>
<part value="ThumbHorz">
<state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">

View File

@ -0,0 +1,4 @@
<svg version="1.1" width="44px" height="26px" viewBox="0 0 44 26" xmlns="http://www.w3.org/2000/svg">
<path d="m43 1.001v24h-40c-1.21 5.9e-5 -2-0.9039-2-2v-20c0-1.164 0.8606-2 2-2 13.33 0.03661 40 0 40 0z" fill="#fff" stroke="#007aff" stroke-width="2"/>
<rect x="18.5" y="12.25" width="7" height="1.5" color="#bebebe" fill="#007aff"/>
</svg>

After

Width:  |  Height:  |  Size: 344 B

View File

@ -0,0 +1,4 @@
<svg version="1.1" width="44px" height="26px" viewBox="0 0 44 26" xmlns="http://www.w3.org/2000/svg">
<path d="m40.84 24.99-39.84-0.002673v-23.99l39.84-0.00267c1.195-8.299e-5 2.156 0.9296 2.156 2.084v19.83c0 1.155-0.9616 2.088-2.156 2.084z" fill="#fff" stroke="#007aff" stroke-width="2"/>
<path d="m21.27 9.428v2.857h-2.915v1.429h2.915v2.857h1.458v-2.857h2.915v-1.429h-2.915v-2.857z" color="#bebebe" fill="#007aff"/>
</svg>

After

Width:  |  Height:  |  Size: 426 B