Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
b49b4117
Commit
b49b4117
authored
Jul 18, 1999
by
Dennis Björklund
Committed by
Alexandre Julliard
Jul 18, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fix in UITOOLS95_DrawRectEdge().
Also a fix to draw scrollbar-buttons more like in win9x.
parent
f0380e57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
19 deletions
+39
-19
uitools.c
controls/uitools.c
+39
-19
No files found.
controls/uitools.c
View file @
b49b4117
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include "wine/winuser16.h"
#include "wine/winuser16.h"
#include "winuser.h"
#include "winuser.h"
#include "debugtools.h"
#include "debugtools.h"
#include "tweak.h"
DEFAULT_DEBUG_CHANNEL
(
graphics
)
DEFAULT_DEBUG_CHANNEL
(
graphics
)
...
@@ -445,6 +446,16 @@ static BOOL UITOOLS95_DrawRectEdge(HDC hdc, LPRECT rc,
...
@@ -445,6 +446,16 @@ static BOOL UITOOLS95_DrawRectEdge(HDC hdc, LPRECT rc,
{
{
LTInnerI
=
RBInnerI
=
LTRBInnerFlat
[
uType
&
(
BDR_INNER
|
BDR_OUTER
)];
LTInnerI
=
RBInnerI
=
LTRBInnerFlat
[
uType
&
(
BDR_INNER
|
BDR_OUTER
)];
LTOuterI
=
RBOuterI
=
LTRBOuterFlat
[
uType
&
(
BDR_INNER
|
BDR_OUTER
)];
LTOuterI
=
RBOuterI
=
LTRBOuterFlat
[
uType
&
(
BDR_INNER
|
BDR_OUTER
)];
/* Bertho Stultiens states above that this function exactly matches win95
* In win98 BF_FLAT rectangels have an inner border same color as the
* middle (COLOR_BTNFACE). I believe it's the same for win95 but since
* I don't know I go with Bertho and just sets it for win98 until proven
* otherwise.
* Dennis Bjrklund, 10 June, 99
*/
if
(
TWEAK_WineLook
==
WIN98_LOOK
&&
LTInnerI
!=
-
1
)
LTInnerI
=
RBInnerI
=
COLOR_BTNFACE
;
}
}
else
if
(
uFlags
&
BF_SOFT
)
else
if
(
uFlags
&
BF_SOFT
)
{
{
...
@@ -471,12 +482,6 @@ static BOOL UITOOLS95_DrawRectEdge(HDC hdc, LPRECT rc,
...
@@ -471,12 +482,6 @@ static BOOL UITOOLS95_DrawRectEdge(HDC hdc, LPRECT rc,
if
(
RBInnerI
!=
-
1
)
RBInnerPen
=
GetSysColorPen
(
RBInnerI
);
if
(
RBInnerI
!=
-
1
)
RBInnerPen
=
GetSysColorPen
(
RBInnerI
);
if
(
RBOuterI
!=
-
1
)
RBOuterPen
=
GetSysColorPen
(
RBOuterI
);
if
(
RBOuterI
!=
-
1
)
RBOuterPen
=
GetSysColorPen
(
RBOuterI
);
if
((
uFlags
&
BF_MIDDLE
)
&&
retval
)
{
FillRect
(
hdc
,
&
InnerRect
,
GetSysColorBrush
(
uFlags
&
BF_MONO
?
COLOR_WINDOW
:
COLOR_BTNFACE
));
}
MoveToEx
(
hdc
,
0
,
0
,
&
SavePoint
);
MoveToEx
(
hdc
,
0
,
0
,
&
SavePoint
);
/* Draw the outer edge */
/* Draw the outer edge */
...
@@ -527,15 +532,24 @@ static BOOL UITOOLS95_DrawRectEdge(HDC hdc, LPRECT rc,
...
@@ -527,15 +532,24 @@ static BOOL UITOOLS95_DrawRectEdge(HDC hdc, LPRECT rc,
LineTo
(
hdc
,
InnerRect
.
right
-
2
,
InnerRect
.
top
-
1
+
RTpenplus
);
LineTo
(
hdc
,
InnerRect
.
right
-
2
,
InnerRect
.
top
-
1
+
RTpenplus
);
}
}
/* Adjust rectangle if asked */
if
(
((
uFlags
&
BF_MIDDLE
)
&&
retval
)
||
(
uFlags
&
BF_ADJUST
)
)
if
(
uFlags
&
BF_ADJUST
)
{
{
int
add
=
(
LTRBInnerMono
[
uType
&
(
BDR_INNER
|
BDR_OUTER
)]
!=
-
1
?
1
:
0
)
int
add
=
(
LTRBInnerMono
[
uType
&
(
BDR_INNER
|
BDR_OUTER
)]
!=
-
1
?
1
:
0
)
+
(
LTRBOuterMono
[
uType
&
(
BDR_INNER
|
BDR_OUTER
)]
!=
-
1
?
1
:
0
);
+
(
LTRBOuterMono
[
uType
&
(
BDR_INNER
|
BDR_OUTER
)]
!=
-
1
?
1
:
0
);
if
(
uFlags
&
BF_LEFT
)
rc
->
left
+=
add
;
if
(
uFlags
&
BF_RIGHT
)
rc
->
right
-=
add
;
if
(
uFlags
&
BF_LEFT
)
InnerRect
.
left
+=
add
;
if
(
uFlags
&
BF_TOP
)
rc
->
top
+=
add
;
if
(
uFlags
&
BF_RIGHT
)
InnerRect
.
right
-=
add
;
if
(
uFlags
&
BF_BOTTOM
)
rc
->
bottom
-=
add
;
if
(
uFlags
&
BF_TOP
)
InnerRect
.
top
+=
add
;
if
(
uFlags
&
BF_BOTTOM
)
InnerRect
.
bottom
-=
add
;
if
((
uFlags
&
BF_MIDDLE
)
&&
retval
)
{
FillRect
(
hdc
,
&
InnerRect
,
GetSysColorBrush
(
uFlags
&
BF_MONO
?
COLOR_WINDOW
:
COLOR_BTNFACE
));
}
if
(
uFlags
&
BF_ADJUST
)
*
rc
=
InnerRect
;
}
}
/* Cleanup */
/* Cleanup */
...
@@ -1123,7 +1137,7 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
...
@@ -1123,7 +1137,7 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
int
i
;
int
i
;
HBRUSH
hbsave
,
hb
,
hb2
;
HBRUSH
hbsave
,
hb
,
hb2
;
HPEN
hpsave
,
hp
,
hp2
;
HPEN
hpsave
,
hp
,
hp2
;
int
tri
=
310
*
SmallDiam
/
1000
;
int
tri
=
290
*
SmallDiam
/
1000
-
1
;
int
d46
,
d93
;
int
d46
,
d93
;
switch
(
uFlags
&
0xff
)
switch
(
uFlags
&
0xff
)
...
@@ -1139,14 +1153,14 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
...
@@ -1139,14 +1153,14 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
case
DFCS_SCROLLUP
:
case
DFCS_SCROLLUP
:
Line
[
2
].
x
=
myr
.
left
+
470
*
SmallDiam
/
1000
+
2
;
Line
[
2
].
x
=
myr
.
left
+
470
*
SmallDiam
/
1000
+
2
;
Line
[
2
].
y
=
myr
.
top
+
313
*
SmallDiam
/
1000
+
1
;
Line
[
2
].
y
=
myr
.
bottom
-
(
687
*
SmallDiam
/
1000
+
1
)
;
Line
[
0
].
x
=
Line
[
2
].
x
-
tri
;
Line
[
0
].
x
=
Line
[
2
].
x
-
tri
;
Line
[
1
].
x
=
Line
[
2
].
x
+
tri
;
Line
[
1
].
x
=
Line
[
2
].
x
+
tri
;
Line
[
0
].
y
=
Line
[
1
].
y
=
Line
[
2
].
y
+
tri
;
Line
[
0
].
y
=
Line
[
1
].
y
=
Line
[
2
].
y
+
tri
;
break
;
break
;
case
DFCS_SCROLLLEFT
:
case
DFCS_SCROLLLEFT
:
Line
[
2
].
x
=
myr
.
left
+
313
*
SmallDiam
/
1000
+
1
;
Line
[
2
].
x
=
myr
.
right
-
(
687
*
SmallDiam
/
1000
+
1
)
;
Line
[
2
].
y
=
myr
.
top
+
470
*
SmallDiam
/
1000
+
2
;
Line
[
2
].
y
=
myr
.
top
+
470
*
SmallDiam
/
1000
+
2
;
Line
[
0
].
y
=
Line
[
2
].
y
-
tri
;
Line
[
0
].
y
=
Line
[
2
].
y
-
tri
;
Line
[
1
].
y
=
Line
[
2
].
y
+
tri
;
Line
[
1
].
y
=
Line
[
2
].
y
+
tri
;
...
@@ -1241,7 +1255,12 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
...
@@ -1241,7 +1255,12 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
}
}
/* Here do the real scroll-bar controls end up */
/* Here do the real scroll-bar controls end up */
UITOOLS95_DFC_ButtonPush
(
dc
,
r
,
uFlags
&
0xff00
);
if
(
!
(
uFlags
&
(
0xff00
&
~
DFCS_ADJUSTRECT
))
)
/* UITOOLS95_DFC_ButtonPush always uses BF_SOFT which we don't */
/* want for the normal scroll-arrow button. */
UITOOLS95_DrawRectEdge
(
dc
,
r
,
EDGE_RAISED
,
(
uFlags
&
DFCS_ADJUSTRECT
)
|
BF_MIDDLE
|
BF_RECT
);
else
UITOOLS95_DFC_ButtonPush
(
dc
,
r
,
(
uFlags
&
0xff00
)
);
if
(
uFlags
&
DFCS_INACTIVE
)
if
(
uFlags
&
DFCS_INACTIVE
)
{
{
...
@@ -1252,11 +1271,12 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
...
@@ -1252,11 +1271,12 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
SelectObject
(
dc
,
hbsave
);
SelectObject
(
dc
,
hbsave
);
}
}
for
(
i
=
0
;
i
<
3
;
i
++
)
if
(
(
uFlags
&
DFCS_INACTIVE
)
||
!
(
uFlags
&
DFCS_PUSHED
)
)
{
for
(
i
=
0
;
i
<
3
;
i
++
)
{
Line
[
i
].
x
--
;
Line
[
i
].
x
--
;
Line
[
i
].
y
--
;
Line
[
i
].
y
--
;
}
}
i
=
uFlags
&
DFCS_INACTIVE
?
COLOR_BTNSHADOW
:
COLOR_BTNTEXT
;
i
=
uFlags
&
DFCS_INACTIVE
?
COLOR_BTNSHADOW
:
COLOR_BTNTEXT
;
hbsave
=
(
HBRUSH
)
SelectObject
(
dc
,
GetSysColorBrush
(
i
));
hbsave
=
(
HBRUSH
)
SelectObject
(
dc
,
GetSysColorBrush
(
i
));
...
...
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