Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
359a748d
Commit
359a748d
authored
Jun 26, 1999
by
Slava Monich
Committed by
Alexandre Julliard
Jun 26, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In case if scrollbar has the same background color as the window
it belongs to, it needs to be filled with 0x55aa bitmap brush.
parent
f2ef1455
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
11 deletions
+50
-11
scroll.c
controls/scroll.c
+33
-9
defwnd.c
windows/defwnd.c
+17
-2
No files found.
controls/scroll.c
View file @
359a748d
...
...
@@ -10,6 +10,7 @@
#include "heap.h"
#include "win.h"
#include "debugtools.h"
#include "cache.h"
#include "tweak.h"
DEFAULT_DEBUG_CHANNEL
(
scroll
)
...
...
@@ -463,6 +464,8 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar,
BOOL
top_selected
,
BOOL
bottom_selected
)
{
RECT
r
;
HPEN
hSavePen
;
HBRUSH
hSaveBrush
,
hBrush
;
BOOL
Save_SCROLL_MovingThumb
=
SCROLL_MovingThumb
;
if
(
Save_SCROLL_MovingThumb
&&
...
...
@@ -472,22 +475,35 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar,
/* Select the correct brush and pen */
SelectObject
(
hdc
,
GetSysColorPen
(
COLOR_WINDOWFRAME
)
);
if
((
flags
&
ESB_DISABLE_BOTH
)
==
ESB_DISABLE_BOTH
)
{
/* This ought to be the color of the parent window */
SelectObject
(
hdc
,
GetSysColorBrush
(
COLOR_WINDOW
)
);
/* This ought to be the color of the parent window */
if
(
TWEAK_WineLook
==
WIN31_LOOK
)
{
hBrush
=
GetSysColorBrush
(
COLOR_WINDOW
);
}
else
{
/* Under Win9x look & feel, scrollbars don't have a solid border.
* To make scrollbar's background different from the window
* background, we need to apply a gray 0x55aa pattern brush.
* Otherwise it won't look good.
*/
hBrush
=
CACHE_GetPattern55AABrush
();
}
}
else
{
if
(
nBar
==
SB_CTL
)
/* Only scrollbar controls send WM_CTLCOLOR */
{
HBRUSH
hbrush
=
SendMessageA
(
GetParent
(
hwnd
),
WM_CTLCOLORSCROLLBAR
,
hdc
,
hwnd
);
SelectObject
(
hdc
,
hbrush
);
/* Only scrollbar controls send WM_CTLCOLORSCROLLBAR.
* The window-owned scrollbars need to call DEFWND_ControlColor
* to correctly setup default scrollbar colors
*/
if
(
nBar
==
SB_CTL
)
{
hBrush
=
(
HBRUSH
)
SendMessageA
(
GetParent
(
hwnd
),
WM_CTLCOLORSCROLLBAR
,
(
WPARAM
)
hdc
,(
LPARAM
)
hwnd
);
}
else
{
hBrush
=
DEFWND_ControlColor
(
hdc
,
CTLCOLOR_SCROLLBAR
);
}
else
SelectObject
(
hdc
,
GetSysColorBrush
(
COLOR_SCROLLBAR
)
);
}
hSavePen
=
SelectObject
(
hdc
,
GetSysColorPen
(
COLOR_WINDOWFRAME
)
);
hSaveBrush
=
SelectObject
(
hdc
,
hBrush
);
/* Calculate the scroll rectangle */
...
...
@@ -515,6 +531,10 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar,
{
PatBlt
(
hdc
,
r
.
left
+
1
,
r
.
top
+
1
,
r
.
right
-
r
.
left
-
2
,
r
.
bottom
-
r
.
top
-
2
,
PATCOPY
);
/* cleanup and return */
SelectObject
(
hdc
,
hSavePen
);
SelectObject
(
hdc
,
hSaveBrush
);
return
;
}
...
...
@@ -565,6 +585,10 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar,
(
SCROLL_TrackingWin
==
hwnd
)
&&
(
SCROLL_TrackingBar
==
nBar
))
SCROLL_DrawMovingThumb
(
hdc
,
rect
,
vertical
,
arrowSize
,
thumbSize
);
/* cleanup */
SelectObject
(
hdc
,
hSavePen
);
SelectObject
(
hdc
,
hSaveBrush
);
}
...
...
windows/defwnd.c
View file @
359a748d
...
...
@@ -16,6 +16,7 @@
#include "debug.h"
#include "spy.h"
#include "tweak.h"
#include "cache.h"
#include "wine/winuser16.h"
DEFAULT_DEBUG_CHANNEL
(
win
)
...
...
@@ -77,8 +78,22 @@ HBRUSH DEFWND_ControlColor( HDC hDC, UINT16 ctlType )
if
(
ctlType
==
CTLCOLOR_SCROLLBAR
)
{
HBRUSH
hb
=
GetSysColorBrush
(
COLOR_SCROLLBAR
);
SetBkColor
(
hDC
,
RGB
(
255
,
255
,
255
)
);
SetTextColor
(
hDC
,
RGB
(
0
,
0
,
0
)
);
if
(
TWEAK_WineLook
==
WIN31_LOOK
)
{
SetTextColor
(
hDC
,
RGB
(
0
,
0
,
0
)
);
SetBkColor
(
hDC
,
RGB
(
255
,
255
,
255
)
);
}
else
{
COLORREF
bk
=
GetSysColor
(
COLOR_3DHILIGHT
);
SetTextColor
(
hDC
,
GetSysColor
(
COLOR_3DFACE
));
SetBkColor
(
hDC
,
bk
);
/* if COLOR_WINDOW happens to be the same as COLOR_3DHILIGHT
* we better use 0x55aa bitmap brush to make scrollbar's background
* look different from the window background.
*/
if
(
bk
==
GetSysColor
(
COLOR_WINDOW
))
{
return
CACHE_GetPattern55AABrush
();
}
}
UnrealizeObject
(
hb
);
return
hb
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment