summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-10-07 16:13:17 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-10-07 20:24:51 +0200
commit8bc5c3bfdb5717f4bff0a513c5c2d17cd728771d (patch)
treea4120ec217fb0e81857324e6a26224c81713cfbc /vcl/win
parentc40671e082b6ece4dbd117346d9f5a3912900e54 (diff)
Related: tdf#98067 use EP_EDITBORDER_NOSCROLL for Edits
which gives a border which indicates if the Edit has focus or not. In High Contrast Black this is a bright yellow and I see it in notepad and visual studio, so lets do that too. MultilineEdit left alone for now Change-Id: I6785e3cdef7d563509a3a6ea8617ab5f89602a6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141085 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/gdi/salnativewidgets-luna.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx
index 331e6c36ef5b..6b676162f7d0 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -721,7 +721,22 @@ static bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption);
}
- if( ( nType == ControlType::Editbox ) || ( nType == ControlType::MultilineEditbox ) )
+ if (nType == ControlType::Editbox)
+ {
+ iPart = EP_EDITBORDER_NOSCROLL;
+ if( !(nState & ControlState::ENABLED) )
+ iState = EPSN_DISABLED;
+ else if( nState & ControlState::FOCUSED )
+ iState = EPSN_FOCUSED;
+ else if( nState & ControlState::ROLLOVER )
+ iState = EPSN_HOT;
+ else
+ iState = EPSN_NORMAL;
+
+ return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption);
+ }
+
+ if (nType == ControlType::MultilineEditbox)
{
iPart = EP_EDITTEXT;
if( !(nState & ControlState::ENABLED) )