summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-05-19 20:29:26 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-05-26 20:21:10 +0200
commitf0960e05c2f540c99062867236419c2a70c1160b (patch)
tree25825918285a783b56449500c59f6210080c1608 /include
parentf292fd3ac15109ad9ced85f2141922f403460618 (diff)
Resolves: tdf#155364 resize buttons and change widget font sizes on zoom
Change-Id: Ied951e6c96881bd56a40ae01077cd7f76f9b7853 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168071 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/svx/gridctrl.hxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index 27d7f25c7cf2..09c2a609a483 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -161,6 +161,7 @@ enum class DbGridControlNavigationBarState
class FmXGridSourcePropListener;
class DisposeListenerGridBridge;
+class DbGridControl;
// NavigationBar
class NavigationBar final : public InterimItemWindow
@@ -195,21 +196,26 @@ class NavigationBar final : public InterimItemWindow
std::shared_ptr<weld::ButtonPressRepeater> m_xPrevRepeater;
std::shared_ptr<weld::ButtonPressRepeater> m_xNextRepeater;
+ Size m_aLastAllocSize;
+
sal_Int32 m_nCurrentPos;
bool m_bPositioning; // protect PositionDataSource against recursion
public:
- NavigationBar(vcl::Window* pParent);
+ NavigationBar(DbGridControl* pParent);
virtual ~NavigationBar() override;
virtual void dispose() override;
+ DECL_LINK(SizeAllocHdl, const Size&, void);
+
// Status methods for Controls
void InvalidateAll(sal_Int32 nCurrentPos, bool bAll = false);
void InvalidateState(DbGridControlNavigationBarState nWhich) {SetState(nWhich);}
void SetState(DbGridControlNavigationBarState nWhich);
bool GetState(DbGridControlNavigationBarState nWhich) const;
- sal_uInt16 ArrangeControls();
+ void SetPointFontAndZoom(const vcl::Font& rFont, const Fraction& rZoom);
+ sal_uInt16 GetPreferredWidth() const;
private:
@@ -278,6 +284,8 @@ private:
osl::Mutex m_aDestructionSafety;
osl::Mutex m_aAdjustSafety;
+ Idle m_aRearrangeIdle;
+
css::util::Date
m_aNullDate; // NullDate of the Numberformatter;
@@ -552,6 +560,8 @@ public:
css::accessibility::XAccessible >
CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ) override;
+ void RearrangeAtIdle();
+
protected:
void RecalcRows(sal_Int32 nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor);
bool SeekCursor(sal_Int32 nRow, bool bAbsolute = false);
@@ -588,6 +598,7 @@ protected:
protected:
void ImplInitWindow( const InitWindowFacet _eInitWhat );
DECL_DLLPRIVATE_LINK(OnDelete, void*, void);
+ DECL_DLLPRIVATE_LINK(RearrangeHdl, Timer*, void);
DECL_DLLPRIVATE_LINK(OnAsyncAdjust, void*, void);
// if the param is != NULL, AdjustRows will be called, else AdjustDataSource