widget theme - update scrollbars, draw from svg
Change-Id: I7e7cd05ce516ab24d380bb8b6a264fd45e1d553c Reviewed-on: https://gerrit.libreoffice.org/68864 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
committed by
Tomaž Vajngerl
parent
767dd751b8
commit
79b9d3875f
@@ -40,6 +40,8 @@ $(eval $(call gb_Package_add_files,vcl_theme_definitions,$(LIBO_SHARE_FOLDER)/th
|
||||
tabitem-first-selected.svgx \
|
||||
tabitem-middle-selected.svgx \
|
||||
tabitem-last-selected.svgx \
|
||||
scrollbar-horizontal.svgx \
|
||||
scrollbar-vertical.svgx \
|
||||
))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
@@ -203,9 +203,16 @@ void drawFromDrawCommands(gfx::DrawRoot const& rDrawRoot, SalGraphics& rGraphics
|
||||
|
||||
aPolyPolygon.transform(basegfx::utils::createTranslateB2DHomMatrix(
|
||||
-aPolyPolygonRange.getMinX(), -aPolyPolygonRange.getMinY()));
|
||||
aPolyPolygon.transform(basegfx::utils::createScaleB2DHomMatrix(
|
||||
aFinalRectangle.getWidth() / aPolyPolygonRange.getWidth(),
|
||||
aFinalRectangle.getHeight() / aPolyPolygonRange.getHeight()));
|
||||
|
||||
double fScaleX = 1.0;
|
||||
double fScaleY = 1.0;
|
||||
if (aPolyPolygonRange.getWidth() > 0.0)
|
||||
fScaleX = aFinalRectangle.getWidth() / aPolyPolygonRange.getWidth();
|
||||
if (aPolyPolygonRange.getHeight() > 0.0)
|
||||
fScaleY = aFinalRectangle.getHeight() / aPolyPolygonRange.getHeight();
|
||||
|
||||
aPolyPolygon.transform(basegfx::utils::createScaleB2DHomMatrix(fScaleX, fScaleY));
|
||||
|
||||
aPolyPolygon.transform(basegfx::utils::createTranslateB2DHomMatrix(
|
||||
aFinalRectangle.getMinX() - 0.5, aFinalRectangle.getMinY() - 0.5));
|
||||
|
||||
@@ -698,6 +705,24 @@ bool FileDefinitionWidgetDraw::getNativeControlRegion(
|
||||
rNativeContentRegion = rBoundingControlRegion;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case ControlType::Scrollbar:
|
||||
{
|
||||
if (ePart == ControlPart::ButtonUp || ePart == ControlPart::ButtonDown
|
||||
|| ePart == ControlPart::ButtonLeft || ePart == ControlPart::ButtonRight)
|
||||
{
|
||||
rNativeContentRegion = tools::Rectangle(aLocation, Size(0, 0));
|
||||
rNativeBoundingRegion = rNativeContentRegion;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
rNativeBoundingRegion = rBoundingControlRegion;
|
||||
rNativeContentRegion = rNativeBoundingRegion;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@@ -227,14 +227,12 @@
|
||||
<scrollbar>
|
||||
<part value="ThumbHorz">
|
||||
<state>
|
||||
<rect stroke="#C7C7C7" fill="#C7C7C7" stroke-width="1" />
|
||||
<line stroke="#007AFF" stroke-width="5" x1="0.01" y1="0.5" x2="0.99" y2="0.5"/>
|
||||
<external source="scrollbar-horizontal.svgx" />
|
||||
</state>
|
||||
</part>
|
||||
<part value="ThumbVert">
|
||||
<state>
|
||||
<rect stroke="#C7C7C7" fill="#C7C7C7" stroke-width="1" />
|
||||
<line stroke="#007AFF" stroke-width="5" x1="0.5" y1="0.01" x2="0.5" y2="0.99"/>
|
||||
<external source="scrollbar-vertical.svgx" />
|
||||
</state>
|
||||
</part>
|
||||
<part value="ButtonUp">
|
||||
@@ -247,22 +245,22 @@
|
||||
</part>
|
||||
<part value="TrackHorzLeft">
|
||||
<state>
|
||||
<rect stroke="#C7C7C7" fill="#C7C7C7" stroke-width="1" />
|
||||
<rect stroke="#8e8e93" fill="#ffffff" stroke-width="0" />
|
||||
</state>
|
||||
</part>
|
||||
<part value="TrackHorzRight">
|
||||
<state>
|
||||
<rect stroke="#C7C7C7" fill="#C7C7C7" stroke-width="1" />
|
||||
<rect stroke="#8e8e93" fill="#ffffff" stroke-width="0" />
|
||||
</state>
|
||||
</part>
|
||||
<part value="TrackVertUpper">
|
||||
<state>
|
||||
<rect stroke="#C7C7C7" fill="#C7C7C7" stroke-width="1" />
|
||||
<rect stroke="#8e8e93" fill="#ffffff" stroke-width="0" />
|
||||
</state>
|
||||
</part>
|
||||
<part value="TrackVertLower">
|
||||
<state>
|
||||
<rect stroke="#C7C7C7" fill="#C7C7C7" stroke-width="1" />
|
||||
<rect stroke="#8e8e93" fill="#ffffff" stroke-width="0" />
|
||||
</state>
|
||||
</part>
|
||||
</scrollbar>
|
||||
|
4
vcl/uiconfig/theme_definitions/scrollbar-horizontal.svgx
Normal file
4
vcl/uiconfig/theme_definitions/scrollbar-horizontal.svgx
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" viewBox="0 0 50 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="50" height="16" fill="#fff"/>
|
||||
<path d="m43.943 8h-37.886" fill="none" stroke="#8e8e93" stroke-linecap="round" stroke-width="8"/>
|
||||
</svg>
|
After Width: | Height: | Size: 226 B |
4
vcl/uiconfig/theme_definitions/scrollbar-vertical.svgx
Normal file
4
vcl/uiconfig/theme_definitions/scrollbar-vertical.svgx
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" viewBox="0 0 16 50" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect y="1e-7" width="16" height="50" fill="#fff"/>
|
||||
<path d="m8 43.943v-37.886" fill="none" stroke="#8e8e93" stroke-linecap="round" stroke-width="8"/>
|
||||
</svg>
|
After Width: | Height: | Size: 235 B |
Reference in New Issue
Block a user