[Libreoffice-commits] core.git: icon-themes/elementary icon-themes/galaxy vcl/inc vcl/source
Caolán McNamara
caolanm at redhat.com
Tue Jan 3 19:45:21 UTC 2017
dev/null |binary
icon-themes/elementary/vcl/res/scrollh.png |binary
icon-themes/elementary/vcl/res/scrollv.png |binary
icon-themes/elementary/vcl/res/scrollvh.png |binary
icon-themes/elementary/vcl/res/wheelh.png |binary
icon-themes/elementary/vcl/res/wheelv.png |binary
icon-themes/elementary/vcl/res/wheelvh.png |binary
icon-themes/galaxy/vcl/res/scrollh.png |binary
icon-themes/galaxy/vcl/res/scrollv.png |binary
icon-themes/galaxy/vcl/res/scrollvh.png |binary
icon-themes/galaxy/vcl/res/wheelh.png |binary
icon-themes/galaxy/vcl/res/wheelv.png |binary
icon-themes/galaxy/vcl/res/wheelvh.png |binary
vcl/inc/svids.hrc | 25 +++++++++++++--------
vcl/source/src/images.src | 29 +++++++++++++++++++++++--
vcl/source/window/scrwnd.cxx | 32 ++++++++++++++++------------
vcl/source/window/scrwnd.hxx | 2 -
17 files changed, 62 insertions(+), 26 deletions(-)
New commits:
commit f3a6d9ad23375e4ed8a687f3c7b65bddd872813c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 3 18:25:47 2017 +0000
split SV_RESID_BITMAP_SCROLLBMP up
Change-Id: I303f60b3347f6e079dd951b0c2a0b727a0696eef
diff --git a/icon-themes/elementary/vcl/res/scrbmp.png b/icon-themes/elementary/vcl/res/scrbmp.png
deleted file mode 100644
index 2f1b62f..0000000
Binary files a/icon-themes/elementary/vcl/res/scrbmp.png and /dev/null differ
diff --git a/icon-themes/elementary/vcl/res/scrollh.png b/icon-themes/elementary/vcl/res/scrollh.png
new file mode 100644
index 0000000..a828538
Binary files /dev/null and b/icon-themes/elementary/vcl/res/scrollh.png differ
diff --git a/icon-themes/elementary/vcl/res/scrollv.png b/icon-themes/elementary/vcl/res/scrollv.png
new file mode 100644
index 0000000..77ef876
Binary files /dev/null and b/icon-themes/elementary/vcl/res/scrollv.png differ
diff --git a/icon-themes/elementary/vcl/res/scrollvh.png b/icon-themes/elementary/vcl/res/scrollvh.png
new file mode 100644
index 0000000..838e665
Binary files /dev/null and b/icon-themes/elementary/vcl/res/scrollvh.png differ
diff --git a/icon-themes/elementary/vcl/res/wheelh.png b/icon-themes/elementary/vcl/res/wheelh.png
new file mode 100644
index 0000000..61776ad
Binary files /dev/null and b/icon-themes/elementary/vcl/res/wheelh.png differ
diff --git a/icon-themes/elementary/vcl/res/wheelv.png b/icon-themes/elementary/vcl/res/wheelv.png
new file mode 100644
index 0000000..0fbadb9
Binary files /dev/null and b/icon-themes/elementary/vcl/res/wheelv.png differ
diff --git a/icon-themes/elementary/vcl/res/wheelvh.png b/icon-themes/elementary/vcl/res/wheelvh.png
new file mode 100644
index 0000000..091d05a
Binary files /dev/null and b/icon-themes/elementary/vcl/res/wheelvh.png differ
diff --git a/icon-themes/galaxy/vcl/res/scrbmp.png b/icon-themes/galaxy/vcl/res/scrbmp.png
deleted file mode 100644
index 901546f..0000000
Binary files a/icon-themes/galaxy/vcl/res/scrbmp.png and /dev/null differ
diff --git a/icon-themes/galaxy/vcl/res/scrollh.png b/icon-themes/galaxy/vcl/res/scrollh.png
new file mode 100644
index 0000000..e9d84d2
Binary files /dev/null and b/icon-themes/galaxy/vcl/res/scrollh.png differ
diff --git a/icon-themes/galaxy/vcl/res/scrollv.png b/icon-themes/galaxy/vcl/res/scrollv.png
new file mode 100644
index 0000000..77ef876
Binary files /dev/null and b/icon-themes/galaxy/vcl/res/scrollv.png differ
diff --git a/icon-themes/galaxy/vcl/res/scrollvh.png b/icon-themes/galaxy/vcl/res/scrollvh.png
new file mode 100644
index 0000000..8ca3d22
Binary files /dev/null and b/icon-themes/galaxy/vcl/res/scrollvh.png differ
diff --git a/icon-themes/galaxy/vcl/res/wheelh.png b/icon-themes/galaxy/vcl/res/wheelh.png
new file mode 100644
index 0000000..12affc0
Binary files /dev/null and b/icon-themes/galaxy/vcl/res/wheelh.png differ
diff --git a/icon-themes/galaxy/vcl/res/wheelv.png b/icon-themes/galaxy/vcl/res/wheelv.png
new file mode 100644
index 0000000..3a5ab34
Binary files /dev/null and b/icon-themes/galaxy/vcl/res/wheelv.png differ
diff --git a/icon-themes/galaxy/vcl/res/wheelvh.png b/icon-themes/galaxy/vcl/res/wheelvh.png
new file mode 100644
index 0000000..de2277a
Binary files /dev/null and b/icon-themes/galaxy/vcl/res/wheelvh.png differ
diff --git a/vcl/inc/svids.hrc b/vcl/inc/svids.hrc
index 4c29393..a8c1a0f 100644
--- a/vcl/inc/svids.hrc
+++ b/vcl/inc/svids.hrc
@@ -37,16 +37,21 @@
#define SV_RESID_BITMAP_SPLITVARW 1043
#define SV_RESID_BITMAP_SCROLLMSK 1050
-#define SV_RESID_BITMAP_SCROLLBMP 1051
-#define SV_RESID_BITMAP_CLOSEDOC 1052
-#define SV_RESID_BITMAP_INDEX 1053
-#define SV_RESID_BITMAP_REFRESH 1054
-#define SV_RESID_BITMAP_NOTEBOOKBAR 1055
-
-#define SV_DISCLOSURE_PLUS 1060
-#define SV_DISCLOSURE_MINUS 1061
-
-#define RID_STR_PAPERNAMES 1070
+#define SV_RESID_BITMAP_WHEELVH 1051
+#define SV_RESID_BITMAP_WHEELV 1052
+#define SV_RESID_BITMAP_WHEELH 1053
+#define SV_RESID_BITMAP_SCROLLVH 1054
+#define SV_RESID_BITMAP_SCROLLV 1055
+#define SV_RESID_BITMAP_SCROLLH 1056
+#define SV_RESID_BITMAP_CLOSEDOC 1057
+#define SV_RESID_BITMAP_INDEX 1058
+#define SV_RESID_BITMAP_REFRESH 1059
+#define SV_RESID_BITMAP_NOTEBOOKBAR 1060
+
+#define SV_DISCLOSURE_PLUS 1070
+#define SV_DISCLOSURE_MINUS 1071
+
+#define RID_STR_PAPERNAMES 1080
#define SV_RESID_MENU_EDIT 2000
#define SV_MENU_EDIT_UNDO 1
diff --git a/vcl/source/src/images.src b/vcl/source/src/images.src
index c29f357..f1011e5 100644
--- a/vcl/source/src/images.src
+++ b/vcl/source/src/images.src
@@ -29,9 +29,34 @@ Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_MONOOFFSET)
File = "checkmono.bmp";
};
-Bitmap (SV_RESID_BITMAP_SCROLLBMP)
+Bitmap (SV_RESID_BITMAP_SCROLLVH)
{
- File = "scrbmp.png";
+ File = "scrollvh.png";
+};
+
+Bitmap (SV_RESID_BITMAP_SCROLLV)
+{
+ File = "scrollv.png";
+};
+
+Bitmap (SV_RESID_BITMAP_SCROLLH)
+{
+ File = "scrollh.png";
+};
+
+Bitmap (SV_RESID_BITMAP_WHEELVH)
+{
+ File = "wheelvh.png";
+};
+
+Bitmap (SV_RESID_BITMAP_WHEELV)
+{
+ File = "wheelv.png";
+};
+
+Bitmap (SV_RESID_BITMAP_WHEELH)
+{
+ File = "wheelh.png";
};
Bitmap (SV_RESID_BITMAP_SCROLLMSK)
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 07a762f..6433a34 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -121,9 +121,15 @@ void ImplWheelWindow::ImplSetRegion( const Bitmap& rRegionBmp )
void ImplWheelWindow::ImplCreateImageList()
{
ResMgr* pResMgr = ImplGetResMgr();
- if( pResMgr )
- maImgList.InsertFromHorizontalBitmap
- ( ResId( SV_RESID_BITMAP_SCROLLBMP, *pResMgr ), 6, nullptr );
+ if (pResMgr)
+ {
+ maImgList.push_back(Image(BitmapEx(ResId(SV_RESID_BITMAP_SCROLLVH, *pResMgr))));
+ maImgList.push_back(Image(BitmapEx(ResId(SV_RESID_BITMAP_SCROLLV, *pResMgr))));
+ maImgList.push_back(Image(BitmapEx(ResId(SV_RESID_BITMAP_SCROLLH, *pResMgr))));
+ maImgList.push_back(Image(BitmapEx(ResId(SV_RESID_BITMAP_WHEELVH, *pResMgr))));
+ maImgList.push_back(Image(BitmapEx(ResId(SV_RESID_BITMAP_WHEELV, *pResMgr))));
+ maImgList.push_back(Image(BitmapEx(ResId(SV_RESID_BITMAP_WHEELH, *pResMgr))));
+ }
}
void ImplWheelWindow::ImplSetWheelMode( WheelMode nWheelMode )
@@ -149,35 +155,35 @@ void ImplWheelWindow::ImplSetWheelMode( WheelMode nWheelMode )
void ImplWheelWindow::ImplDrawWheel(vcl::RenderContext& rRenderContext)
{
- sal_uInt16 nId;
+ int nIndex;
switch (mnWheelMode)
{
case WheelMode::VH:
- nId = 1;
+ nIndex = 0;
break;
case WheelMode::V:
- nId = 2;
+ nIndex = 1;
break;
case WheelMode::H:
- nId = 3;
+ nIndex = 2;
break;
case WheelMode::ScrollVH:
- nId = 4;
+ nIndex = 3;
break;
case WheelMode::ScrollV:
- nId = 5;
+ nIndex = 4;
break;
case WheelMode::ScrollH:
- nId = 6;
+ nIndex = 5;
break;
default:
- nId = 0;
+ nIndex = -1;
break;
}
- if (nId)
- rRenderContext.DrawImage(Point(), maImgList.GetImage(nId));
+ if (nIndex >= 0)
+ rRenderContext.DrawImage(Point(), maImgList[nIndex]);
}
void ImplWheelWindow::ImplRecalcScrollValues()
diff --git a/vcl/source/window/scrwnd.hxx b/vcl/source/window/scrwnd.hxx
index ae23307..3f1c211 100644
--- a/vcl/source/window/scrwnd.hxx
+++ b/vcl/source/window/scrwnd.hxx
@@ -43,7 +43,7 @@ class ImplWheelWindow : public FloatingWindow
{
private:
- ImageList maImgList;
+ std::vector<Image> maImgList;
Point maLastMousePos;
Point maCenter;
Timer* mpTimer;
More information about the Libreoffice-commits
mailing list