From 215b0f674cadc940b8ffdbeadaf0fd60a0f2f167 Mon Sep 17 00:00:00 2001 From: 008 <353501300@qq.com> Date: Wed, 16 Mar 2022 12:26:45 +0800 Subject: [PATCH] =?UTF-8?q?SSpinButtonCtrl=20=E6=B7=BB=E5=8A=A0DPI?= =?UTF-8?q?=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SOUI/include/control/SSpinButtonCtrl.h | 2 +- SOUI/src/control/SSpinButtonCtrl.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/SOUI/include/control/SSpinButtonCtrl.h b/SOUI/include/control/SSpinButtonCtrl.h index 1a118243..dd47cc46 100644 --- a/SOUI/include/control/SSpinButtonCtrl.h +++ b/SOUI/include/control/SSpinButtonCtrl.h @@ -23,7 +23,7 @@ namespace SOUI protected: void OnValueChanged(bool bInit=false); - + void OnScaleChanged(int scale); void OnLButtonDown(UINT nFlags, CPoint point); void OnLButtonUp(UINT nFlags, CPoint point); void OnMouseMove(UINT nFlags, CPoint point); diff --git a/SOUI/src/control/SSpinButtonCtrl.cpp b/SOUI/src/control/SSpinButtonCtrl.cpp index c1b9a6b6..fc239392 100644 --- a/SOUI/src/control/SSpinButtonCtrl.cpp +++ b/SOUI/src/control/SSpinButtonCtrl.cpp @@ -93,7 +93,14 @@ namespace SOUI FireEvent(evt); pBuddy->SetWindowText(evt.strValue); } - } + } + + void SSpinButtonCtrl::OnScaleChanged(int scale) + { + __super::OnScaleChanged(scale); + GetScaleSkin(m_pUpSkin, scale); + GetScaleSkin(m_pDownSkin, scale); + } void SSpinButtonCtrl::OnLButtonDown(UINT nFlags, CPoint point) -- Gitee