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
8a0dab38
Commit
8a0dab38
authored
Jan 07, 2008
by
Divan Burger
Committed by
Alexandre Julliard
Jan 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Clamp hue and saturation when clicking in colour graph in colour dialog.
parent
19ed5849
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
colordlg.c
dlls/comdlg32/colordlg.c
+21
-16
No files found.
dlls/comdlg32/colordlg.c
View file @
8a0dab38
...
...
@@ -337,24 +337,29 @@ static int CC_MouseCheckColorGraph( HWND hDlg, int dlgitem, int *hori, int *vert
ClientToScreen
(
hDlg
,
&
point
);
hwnd
=
GetDlgItem
(
hDlg
,
dlgitem
);
GetWindowRect
(
hwnd
,
&
rect
);
if
(
PtInRect
(
&
rect
,
point
))
{
GetClientRect
(
hwnd
,
&
rect
);
ScreenToClient
(
hwnd
,
&
point
);
x
=
(
long
)
point
.
x
*
MAXHORI
;
x
/=
rect
.
right
;
y
=
(
long
)
(
rect
.
bottom
-
point
.
y
)
*
MAXVERT
;
y
/=
rect
.
bottom
;
if
(
hori
)
*
hori
=
x
;
if
(
vert
)
*
vert
=
y
;
return
1
;
}
else
if
(
!
PtInRect
(
&
rect
,
point
))
return
0
;
GetClientRect
(
hwnd
,
&
rect
);
ScreenToClient
(
hwnd
,
&
point
);
x
=
(
long
)
point
.
x
*
MAXHORI
;
x
/=
rect
.
right
;
y
=
(
long
)
(
rect
.
bottom
-
point
.
y
)
*
MAXVERT
;
y
/=
rect
.
bottom
;
if
(
x
<
0
)
x
=
0
;
if
(
y
<
0
)
y
=
0
;
if
(
x
>
MAXHORI
)
x
=
MAXHORI
;
if
(
y
>
MAXVERT
)
y
=
MAXVERT
;
if
(
hori
)
*
hori
=
x
;
if
(
vert
)
*
vert
=
y
;
return
1
;
}
/***********************************************************************
* CC_MouseCheckResultWindow [internal]
...
...
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