Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
9b4e33b4
Commit
9b4e33b4
authored
Apr 11, 2003
by
VideoLAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fixed bug: When button or checkbox are disabled, the previous control can't
take the hand
parent
c31926a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
26 deletions
+37
-26
modules/gui/skins/controls/button.cpp
modules/gui/skins/controls/button.cpp
+26
-18
modules/gui/skins/controls/checkbox.cpp
modules/gui/skins/controls/checkbox.cpp
+8
-6
modules/gui/skins/controls/image.cpp
modules/gui/skins/controls/image.cpp
+3
-2
No files found.
modules/gui/skins/controls/button.cpp
View file @
9b4e33b4
...
...
@@ -2,7 +2,7 @@
* button.cpp: Button control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: button.cpp,v 1.
4 2003/03/20 09:29:07 karibu
Exp $
* $Id: button.cpp,v 1.
5 2003/04/11 21:19:49 videolan
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -134,16 +134,20 @@ void ControlButton::Draw( int x, int y, int w, int h, Graphics *dest )
//---------------------------------------------------------------------------
bool
ControlButton
::
MouseUp
(
int
x
,
int
y
,
int
button
)
{
if
(
!
Enabled
)
return
false
;
if
(
Img
[
1
]
->
Hit
(
x
-
Left
,
y
-
Top
)
&&
button
==
1
&&
Selected
)
// If hit in the button
if
(
Img
[
1
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
{
State
=
1
;
Selected
=
false
;
ClickAction
->
SendEvent
();
ParentWindow
->
Refresh
(
Left
,
Top
,
Width
,
Height
);
return
true
;
if
(
!
Enabled
)
return
true
;
if
(
button
==
1
&&
Selected
)
{
State
=
1
;
Selected
=
false
;
ClickAction
->
SendEvent
();
ParentWindow
->
Refresh
(
Left
,
Top
,
Width
,
Height
);
return
true
;
}
}
if
(
button
==
1
)
...
...
@@ -154,16 +158,20 @@ bool ControlButton::MouseUp( int x, int y, int button )
//---------------------------------------------------------------------------
bool
ControlButton
::
MouseDown
(
int
x
,
int
y
,
int
button
)
{
if
(
!
Enabled
)
return
false
;
if
(
Img
[
0
]
->
Hit
(
x
-
Left
,
y
-
Top
)
&&
button
==
1
)
if
(
Img
[
0
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
{
State
=
0
;
Selected
=
true
;
ParentWindow
->
Refresh
(
Left
,
Top
,
Width
,
Height
);
return
true
;
if
(
!
Enabled
)
return
true
;
if
(
button
==
1
)
{
State
=
0
;
Selected
=
true
;
ParentWindow
->
Refresh
(
Left
,
Top
,
Width
,
Height
);
return
true
;
}
}
return
false
;
}
//---------------------------------------------------------------------------
...
...
modules/gui/skins/controls/checkbox.cpp
View file @
9b4e33b4
...
...
@@ -2,7 +2,7 @@
* checkbox.cpp: Checkbox control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: checkbox.cpp,v 1.
2 2003/03/19 17:14:50 karibu
Exp $
* $Id: checkbox.cpp,v 1.
3 2003/04/11 21:19:49 videolan
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -199,8 +199,9 @@ void ControlCheckBox::Draw( int x, int y, int w, int h, Graphics *dest )
bool
ControlCheckBox
::
MouseUp
(
int
x
,
int
y
,
int
button
)
{
// Test enabled
if
(
(
!
Enabled1
&&
Act
==
1
)
||
(
!
Enabled2
&&
Act
==
2
)
)
return
false
;
if
(
(
!
Enabled1
&&
Act
==
1
&&
Img
[
1
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
||
(
!
Enabled2
&&
Act
==
2
&&
Img
[
3
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
)
return
true
;
if
(
button
==
1
&&
Selected
)
{
...
...
@@ -229,10 +230,11 @@ bool ControlCheckBox::MouseUp( int x, int y, int button )
//---------------------------------------------------------------------------
bool
ControlCheckBox
::
MouseDown
(
int
x
,
int
y
,
int
button
)
{
// Test enabled
if
(
(
!
Enabled1
&&
Act
==
1
)
||
(
!
Enabled2
&&
Act
==
2
)
)
return
false
;
// Test enabled
if
(
(
!
Enabled1
&&
Act
==
1
&&
Img
[
1
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
||
(
!
Enabled2
&&
Act
==
2
&&
Img
[
3
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
)
return
true
;
if
(
button
==
1
)
{
if
(
Act
==
1
&&
Img
[
0
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
...
...
modules/gui/skins/controls/image.cpp
View file @
9b4e33b4
...
...
@@ -2,7 +2,7 @@
* image.cpp: Image control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: image.cpp,v 1.
1 2003/03/18 02:21:47 ipkiss
Exp $
* $Id: image.cpp,v 1.
2 2003/04/11 21:19:49 videolan
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -95,7 +95,8 @@ bool ControlImage::MouseDown( int x, int y, int button )
{
if
(
!
Enabled
||
!
Img
[
0
]
->
Hit
(
x
-
Left
,
y
-
Top
)
||
button
!=
1
||
!
MouseDownAction
->
SendEvent
()
)
return
false
;
return
false
;
return
true
;
}
//---------------------------------------------------------------------------
...
...
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