diff options
author | Sarabjot Singh <saini.sarabjotsingh@gmail.com> | 2020-02-28 22:47:40 +0300 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2021-05-18 08:33:31 +0200 |
commit | 40e85aadbff8eaeba20ee6a39ca669d282d91005 (patch) | |
tree | 581f051765db01ac25b6d3426762d1c7b97155ca | |
parent | 2b3879c748adb8d48606339cecaf81a12c19f697 (diff) |
tdf#104169 - Change mouse cursor to FatCross in calc spreadsheet
Added new cursor FatCross to calc. Change mouse cursor to
FatCross while hovering over the spreadsheet in calc instead
of earlier Arrow.
Co-authored-by: Mesut Çifci <mesutcifci97@gmail.com>
Change-Id: I672a058cc702eab0cba6ac953534def915766859
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114679
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
-rwxr-xr-x | icon-themes/colibre/vcl/res/fatcross.png | bin | 0 -> 311 bytes | |||
-rw-r--r-- | icon-themes/colibre_svg/vcl/res/fatcross.svg | 1 | ||||
-rw-r--r-- | include/vcl/ptrstyle.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fudraw.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/tabview5.cxx | 2 | ||||
-rw-r--r-- | vcl/inc/bitmaps.hlst | 1 | ||||
-rw-r--r-- | vcl/inc/cursor_hotspots.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/unx/x11_cursors/fatcross_curs.h | 34 | ||||
-rw-r--r-- | vcl/inc/unx/x11_cursors/fatcross_mask.h | 34 | ||||
-rw-r--r-- | vcl/inc/unx/x11_cursors/salcursors.h | 2 | ||||
-rw-r--r-- | vcl/inc/win/salids.hrc | 1 | ||||
-rw-r--r-- | vcl/osx/saldata.cxx | 2 | ||||
-rw-r--r-- | vcl/qt5/Qt5Data.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtkdata.cxx | 1 | ||||
-rwxr-xr-x | vcl/win/src/fatcross.cur | bin | 0 -> 4286 bytes | |||
-rw-r--r-- | vcl/win/src/salsrc.rc | 1 | ||||
-rw-r--r-- | vcl/win/window/salframe.cxx | 4 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 1 |
20 files changed, 96 insertions, 7 deletions
diff --git a/icon-themes/colibre/vcl/res/fatcross.png b/icon-themes/colibre/vcl/res/fatcross.png Binary files differnew file mode 100755 index 000000000000..bf13fd80b06c --- /dev/null +++ b/icon-themes/colibre/vcl/res/fatcross.png diff --git a/icon-themes/colibre_svg/vcl/res/fatcross.svg b/icon-themes/colibre_svg/vcl/res/fatcross.svg new file mode 100644 index 000000000000..e2bed8d22b3e --- /dev/null +++ b/icon-themes/colibre_svg/vcl/res/fatcross.svg @@ -0,0 +1 @@ +<svg width="32" height="32" version="1.0" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><defs><filter id="a" x="-.048092" y="-.047909" width="1.0962" height="1.0958" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="0.23808637"/></filter></defs><g filter="url(#a)" opacity=".8" stroke="#000"><g stroke-width=".75"><rect x="7.0963" y="15.052" width="1.0473" height="1.1391" opacity=".34953"/><rect x="9.9338" y="15.048" width="6.2029" height="4.0268" opacity=".34953"/><rect x="15.06" y="7.1478" width="1.1533" height="1.149" opacity=".34953"/></g><rect x="16.875" y="9.9984" width="2.1028" height="6.0363" opacity=".34953" stroke-width=".75627"/></g><g transform="matrix(.032692 0 0 -.032692 .34615 23.885)"><path d="m240 525v-45h-90v-210h90v-90h210v90h90v210h-90v90h-210zm180-30v-45h90v-150h-90v-90h-150v90h-90v150h90v90h150z"/></g><path transform="scale(.75)" d="m12.234 20.701v-1.9887h-3.9171v-6.4482h3.9171v-3.9171h6.5085v3.9171h3.9171v6.4482h-3.9171v3.9774h-6.5085z" fill="#fff" stroke="#fff" stroke-width=".060264"/></svg> diff --git a/include/vcl/ptrstyle.hxx b/include/vcl/ptrstyle.hxx index e2ae0238e301..fa45246a816d 100644 --- a/include/vcl/ptrstyle.hxx +++ b/include/vcl/ptrstyle.hxx @@ -116,7 +116,8 @@ enum class PointerStyle TabSelectSW, HideWhitespace, ShowWhitespace, - LAST = ShowWhitespace, + FatCross, + LAST = FatCross, }; #endif // INCLUDED_VCL_PTRSTYLE_HXX diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index 2069bace5936..81057be0feb4 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -59,7 +59,7 @@ void collectUIInformation( const OUString& aevent ) FuDraw::FuDraw(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP, SdrModel* pDoc, const SfxRequest& rReq) : FuPoor(rViewSh, pWin, pViewP, pDoc, rReq) - , aNewPointer(PointerStyle::Arrow) + , aNewPointer(PointerStyle::FatCross) , aOldPointer(PointerStyle::Arrow) { } diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 166bdd265e09..408034bd74f3 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -2014,7 +2014,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) rMark.SetMarking(false); - SetPointer( PointerStyle::Arrow ); + SetPointer( PointerStyle::FatCross ); if (mrViewData.IsFillMode() || ( mrViewData.GetFillMode() == ScFillMode::MATRIX && rMEvt.IsMod1() )) @@ -2600,7 +2600,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) bool bAlt = rMEvt.IsMod2(); if (bEditMode) // First has to be in edit mode! - SetPointer( PointerStyle::Arrow ); + SetPointer( PointerStyle::FatCross ); else if ( !bAlt && !nButtonDown && ScGlobal::ShouldOpenURL() && GetEditUrl(rMEvt.GetPosPixel()) ) SetPointer( PointerStyle::RefHand ); diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index fde36dce68cd..af7c3dfb19b7 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -648,7 +648,7 @@ void ScTabView::ResetBrushDocument() if ( HasPaintBrush() ) { SetBrushDocument( nullptr, false ); - SetActivePointer( PointerStyle::Arrow ); // switch pointers also when ended with escape key + SetActivePointer( PointerStyle::FatCross ); // switch pointers also when ended with escape key } } diff --git a/vcl/inc/bitmaps.hlst b/vcl/inc/bitmaps.hlst index 02e3dea0f540..c370883e26dc 100644 --- a/vcl/inc/bitmaps.hlst +++ b/vcl/inc/bitmaps.hlst @@ -218,6 +218,7 @@ #define RID_CURSOR_WINDOW_NESIZE "vcl/res/window_nesize.png" #define RID_CURSOR_WINDOW_SWSIZE "vcl/res/window_swsize.png" #define RID_CURSOR_WINDOW_SESIZE "vcl/res/window_sesize.png" +#define RID_CURSOR_FATCROSS "vcl/res/fatcross.png" #define CHEVRON "sfx2/res/chevron.png" diff --git a/vcl/inc/cursor_hotspots.hxx b/vcl/inc/cursor_hotspots.hxx index 74a041ddd9ca..7f356fa956dc 100644 --- a/vcl/inc/cursor_hotspots.hxx +++ b/vcl/inc/cursor_hotspots.hxx @@ -163,6 +163,8 @@ #define window_swsize_curs_y_hot 10 #define window_sesize_curs_x_hot 10 #define window_sesize_curs_y_hot 10 +#define fatcross_curs_x_hot 15 +#define fatcross_curs_y_hot 15 #endif diff --git a/vcl/inc/unx/x11_cursors/fatcross_curs.h b/vcl/inc/unx/x11_cursors/fatcross_curs.h new file mode 100644 index 000000000000..64322342a3c7 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/fatcross_curs.h @@ -0,0 +1,34 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#define fatcross_curs_width 32 +#define fatcross_curs_height 32 +#define fatcross_curs_x_hot 15 +#define fatcross_curs_y_hot 15 +static unsigned char fatcross_curs_bits[] + = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x0f, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x00, 0x80, + 0x0f, 0xf8, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, + 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, + 0x00, 0x80, 0x0f, 0xf8, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x08, + 0x08, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/unx/x11_cursors/fatcross_mask.h b/vcl/inc/unx/x11_cursors/fatcross_mask.h new file mode 100644 index 000000000000..d3db67d647c3 --- /dev/null +++ b/vcl/inc/unx/x11_cursors/fatcross_mask.h @@ -0,0 +1,34 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#define fatcross_mask_width 32 +#define fatcross_mask_height 32 +#define fatcross_mask_x_hot 15 +#define fatcross_mask_y_hot 15 +static unsigned char fatcross_mask_bits[] + = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x0f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x80, + 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, + 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, + 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf8, + 0x0f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/unx/x11_cursors/salcursors.h b/vcl/inc/unx/x11_cursors/salcursors.h index 1b8aa6c08a59..afe8fc756f49 100644 --- a/vcl/inc/unx/x11_cursors/salcursors.h +++ b/vcl/inc/unx/x11_cursors/salcursors.h @@ -147,5 +147,7 @@ #include <unx/x11_cursors/wshide_mask.h> #include <unx/x11_cursors/wsshow_curs.h> #include <unx/x11_cursors/wsshow_mask.h> +#include <unx/x11_cursors/fatcross_curs.h> +#include <unx/x11_cursors/fatcross_mask.h> /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/win/salids.hrc b/vcl/inc/win/salids.hrc index 092a24b5225b..7212ee902295 100644 --- a/vcl/inc/win/salids.hrc +++ b/vcl/inc/win/salids.hrc @@ -83,6 +83,7 @@ #define SAL_RESID_POINTER_TAB_SELECT_SW 10077 #define SAL_RESID_POINTER_HIDEWHITESPACE 10079 #define SAL_RESID_POINTER_SHOWWHITESPACE 10080 +#define SAL_RESID_POINTER_FATCROSS 10081 #define SAL_RESID_BITMAP_50 11000 diff --git a/vcl/osx/saldata.cxx b/vcl/osx/saldata.cxx index bf0659f0f0d8..d49df78d2ccf 100644 --- a/vcl/osx/saldata.cxx +++ b/vcl/osx/saldata.cxx @@ -240,6 +240,8 @@ NSCursor* SalData::getCursor( PointerStyle i_eStyle ) MAKE_CURSOR( PointerStyle::HideWhitespace, hidewhitespace_, RID_CURSOR_HIDE_WHITESPACE ); MAKE_CURSOR( PointerStyle::ShowWhitespace, showwhitespace_, RID_CURSOR_SHOW_WHITESPACE ); + MAKE_CURSOR( PointerStyle::FatCross, fatcross_, RID_CURSOR_FATCROSS ); + default: SAL_WARN( "vcl", "pointer style " << static_cast<sal_Int32>(i_eStyle) << "not implemented" ); assert( false && "pointer style not implemented" ); diff --git a/vcl/qt5/Qt5Data.cxx b/vcl/qt5/Qt5Data.cxx index c50f8c57ddc6..45e71765bac1 100644 --- a/vcl/qt5/Qt5Data.cxx +++ b/vcl/qt5/Qt5Data.cxx @@ -150,6 +150,8 @@ #include <unx/x11_cursors/wshide_mask.h> #include <unx/x11_cursors/wsshow_curs.h> #include <unx/x11_cursors/wsshow_mask.h> +#include <unx/x11_cursors/fatcross_curs.h> +#include <unx/x11_cursors/fatcross_mask.h> #include <unx/glyphcache.hxx> @@ -181,7 +183,6 @@ static QCursor* getQCursorFromXBM(const unsigned char* pBitmap, const unsigned c QBitmap aMask = QBitmap::fromData(QSize(nWidth, nHeight), pMask); return new QCursor(aPixmap, aMask, nXHot, nYHot); } - #define MAKE_CURSOR(vcl_name, name) \ case vcl_name: \ pCursor = getQCursorFromXBM(name##curs##_bits, name##mask##_bits, name##curs_width, \ @@ -302,6 +303,8 @@ QCursor& Qt5Data::getCursor(PointerStyle ePointerStyle) MAKE_CURSOR(PointerStyle::HideWhitespace, hidewhitespace_); MAKE_CURSOR(PointerStyle::ShowWhitespace, showwhitespace_); + + MAKE_CURSOR(PointerStyle::FatCross, fatcross_); default: break; } diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index ce72a42494e9..4272f9e89812 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -1802,6 +1802,9 @@ Cursor SalDisplay::GetPointer( PointerStyle ePointerStyle ) case PointerStyle::ShowWhitespace: MAKE_CURSOR( showwhitespace_ ); break; + case PointerStyle::FatCross: + MAKE_CURSOR( fatcross_ ); + break; default: OSL_FAIL("pointer not implemented"); diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx index 639eedb62c87..931454fbb396 100644 --- a/vcl/unx/gtk3/gtkdata.cxx +++ b/vcl/unx/gtk3/gtkdata.cxx @@ -265,6 +265,7 @@ GdkCursor *GtkSalDisplay::getCursor( PointerStyle ePointerStyle ) MAKE_CURSOR( PointerStyle::HideWhitespace, hidewhitespace_, RID_CURSOR_HIDE_WHITESPACE ); MAKE_CURSOR( PointerStyle::ShowWhitespace, showwhitespace_, RID_CURSOR_SHOW_WHITESPACE ); + MAKE_CURSOR( PointerStyle::FatCross, fatcross_, RID_CURSOR_FATCROSS ); default: SAL_WARN( "vcl.gtk", "pointer " << static_cast<int>(ePointerStyle) << "not implemented" ); diff --git a/vcl/win/src/fatcross.cur b/vcl/win/src/fatcross.cur Binary files differnew file mode 100755 index 000000000000..68f095f15fd4 --- /dev/null +++ b/vcl/win/src/fatcross.cur diff --git a/vcl/win/src/salsrc.rc b/vcl/win/src/salsrc.rc index a4c5cf574e6a..b23ac149a7fe 100644 --- a/vcl/win/src/salsrc.rc +++ b/vcl/win/src/salsrc.rc @@ -81,6 +81,7 @@ SAL_RESID_POINTER_TAB_SELECT_W CURSOR tblselw.cur SAL_RESID_POINTER_TAB_SELECT_SW CURSOR tblselsw.cur SAL_RESID_POINTER_HIDEWHITESPACE CURSOR wshide.cur SAL_RESID_POINTER_SHOWWHITESPACE CURSOR wsshow.cur +SAL_RESID_POINTER_FATCROSS CURSOR fatcross.cur SAL_RESID_BITMAP_50 BITMAP "50.bmp" diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index c87e290bdad2..a727d8a76462 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -2144,7 +2144,9 @@ void WinSalFrame::SetPointer( PointerStyle ePointerStyle ) { nullptr, nullptr, SAL_RESID_POINTER_TAB_SELECT_SW }, // POINTER_TAB_SELECT_SW { nullptr, nullptr, SAL_RESID_POINTER_HIDEWHITESPACE }, // POINTER_HIDEWHITESPACE - { nullptr, nullptr, SAL_RESID_POINTER_SHOWWHITESPACE } // POINTER_UNHIDEWHITESPACE + { nullptr, nullptr, SAL_RESID_POINTER_SHOWWHITESPACE }, // POINTER_UNHIDEWHITESPACE + + { nullptr, nullptr, SAL_RESID_POINTER_FATCROSS } // POINTER_FATCROSS }; // Mousepointer loaded ? diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 45d541c35546..38557c20b955 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1885,6 +1885,7 @@ const PointerData gvPointerData [] = { { PointerStyle::TabSelectSW, "TabSelectSW" }, { PointerStyle::HideWhitespace, "HideWhitespace" }, { PointerStyle::ShowWhitespace, "ShowWhitespace" }, + { PointerStyle::FatCross, "FatCross" }, }; namespace { |