summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrijan Bhatia <srijanbhatiasun@gmail.com>2020-08-04 13:43:21 +0530
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2020-08-08 07:55:34 +0200
commitd04260e5318fad36b3a29deaf9a823052bc6bea9 (patch)
treee3dcfe22daa94de870eb1d2fd055fc45387edc3c
parent7657fecbceb656d7745a0ae7674a733c722343d8 (diff)
Presenter console new vertical separator
Change-Id: I82e30a8dd73ba91605ae839847fb6378b1d54b3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100044 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
-rw-r--r--icon-themes/colibre/sd/res/presenterscreen-Separator.pngbin0 -> 277 bytes
-rw-r--r--icon-themes/colibre_svg/sd/res/presenterscreen-Separator.svg1
-rw-r--r--sd/inc/bitmaps.hlst1
-rw-r--r--sd/source/ui/presenter/PresenterHelper.cxx4
-rw-r--r--sdext/source/presenter/PresenterToolBar.cxx10
5 files changed, 12 insertions, 4 deletions
diff --git a/icon-themes/colibre/sd/res/presenterscreen-Separator.png b/icon-themes/colibre/sd/res/presenterscreen-Separator.png
new file mode 100644
index 000000000000..a7a35fa7e632
--- /dev/null
+++ b/icon-themes/colibre/sd/res/presenterscreen-Separator.png
Binary files differ
diff --git a/icon-themes/colibre_svg/sd/res/presenterscreen-Separator.svg b/icon-themes/colibre_svg/sd/res/presenterscreen-Separator.svg
new file mode 100644
index 000000000000..aa8a387ad5d3
--- /dev/null
+++ b/icon-themes/colibre_svg/sd/res/presenterscreen-Separator.svg
@@ -0,0 +1 @@
+<svg height="65" viewBox="0 0 .26458332 17.197917" width="1" xmlns="http://www.w3.org/2000/svg"><path d="m.06614583.00000008h.13229167l.06614583 8.20208312-.06614583 8.9958328h-.13229167l-.06614583-8.9958328z" fill="#b3b7bc" opacity=".8"/></svg> \ No newline at end of file
diff --git a/sd/inc/bitmaps.hlst b/sd/inc/bitmaps.hlst
index 748ea562efa1..6186abcab3c1 100644
--- a/sd/inc/bitmaps.hlst
+++ b/sd/inc/bitmaps.hlst
@@ -104,6 +104,7 @@
#define BMP_PRESENTERSCREEN_BORDER_ACTIVE_LEFT "sd/res/presenterscreen-BorderActiveLeft.png"
#define BMP_PRESENTERSCREEN_BUTTON_HELP_NORMAL "sd/res/presenterscreen-ButtonHelpNormal.png"
#define BMP_PRESENTERSCREEN_BUTTON_EXIT_PRESENTER_NORMAL "sd/res/presenterscreen-ButtonExitPresenterNormal.png"
+#define BMP_PRESENTERSCREEN_SEPARATOR "sd/res/presenterscreen-Separator.png"
#define BMP_PRESENTERSCREEN_BORDER_ACTIVE_BOTTOM_CALLOUT "sd/res/presenterscreen-BorderActiveBottomCallout.png"
#define BMP_PRESENTERSCREEN_BORDER_TOOLBAR_LEFT "sd/res/presenterscreen-BorderToolbarLeft.png"
#define BMP_PRESENTERSCREEN_BUTTON_SLIDE_SORTER_NORMAL "sd/res/presenterscreen-ButtonSlideSorterNormal.png"
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx
index ec1d63e7029c..7504e914e475 100644
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -380,7 +380,9 @@ Reference<rendering::XBitmap> SAL_CALL PresenterHelper::loadBitmap (
BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_TOP_MOUSE_OVER },
{ "bitmaps/ScrollbarThumbTopNormal.png",
BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_TOP_NORMAL },
- { "bitmaps/ViewBackground.png", BMP_PRESENTERSCREEN_VIEW_BACKGROUND }
+ { "bitmaps/ViewBackground.png", BMP_PRESENTERSCREEN_VIEW_BACKGROUND },
+ { "bitmaps/Separator.png",
+ BMP_PRESENTERSCREEN_SEPARATOR }
};
OUString bmpid;
for (std::size_t i = 0; i != SAL_N_ELEMENTS(map); ++i) {
diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx
index ad0f36707c11..d36f42277da4 100644
--- a/sdext/source/presenter/PresenterToolBar.cxx
+++ b/sdext/source/presenter/PresenterToolBar.cxx
@@ -1953,7 +1953,7 @@ void VerticalSeparator::Paint (
awt::Rectangle aBBox (GetBoundingBox());
rendering::RenderState aRenderState(
- geometry::AffineMatrix2D(1,0,0, 0,1,0),
+ geometry::AffineMatrix2D(1,0,aBBox.X, 0,1,aBBox.Y),
nullptr,
Sequence<double>(4),
rendering::CompositeOperation::OVER);
@@ -1964,8 +1964,12 @@ void VerticalSeparator::Paint (
PresenterCanvasHelper::SetDeviceColor(aRenderState, pFont->mnColor);
}
- rxCanvas->fillPolyPolygon(
- PresenterGeometryHelper::CreatePolygon(aBBox, rxCanvas->getDevice()),
+ Reference<rendering::XBitmap> xBitmap(mpToolBar->GetPresenterController()->GetPresenterHelper()->loadBitmap("bitmaps/Separator.png", rxCanvas));
+ if (!xBitmap.is())
+ return;
+
+ rxCanvas->drawBitmap(
+ xBitmap,
rViewState,
aRenderState);
}