Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
dc3430bd
Commit
dc3430bd
authored
Jan 26, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fixed slider knobs in the black ui style
parent
cf5a8222
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
+22
-5
modules/gui/macosx/misc.h
modules/gui/macosx/misc.h
+2
-0
modules/gui/macosx/misc.m
modules/gui/macosx/misc.m
+20
-5
No files found.
modules/gui/macosx/misc.h
View file @
dc3430bd
...
...
@@ -134,6 +134,8 @@
@interface
ITSlider
:
NSSlider
{
NSImage
*
img
;
NSRect
image_rect
;
}
-
(
void
)
drawRect
:(
NSRect
)
rect
;
...
...
modules/gui/macosx/misc.m
View file @
dc3430bd
...
...
@@ -603,7 +603,10 @@ void _drawFrameInRect(NSRect frameRect)
-
(
void
)
awakeFromNib
{
o_knob_img
=
[
NSImage
imageNamed
:
@"progression-knob"
];
if
(
config_GetInt
(
VLCIntf
,
"macosx-interfacestyle"
))
o_knob_img
=
[
NSImage
imageNamed
:
@"progression-knob_dark"
];
else
o_knob_img
=
[
NSImage
imageNamed
:
@"progression-knob"
];
img_rect
.
size
=
[
o_knob_img
size
];
img_rect
.
origin
.
x
=
img_rect
.
origin
.
y
=
0
;
}
...
...
@@ -650,13 +653,25 @@ void _drawFrameInRect(NSRect frameRect)
@implementation
ITSlider
-
(
void
)
drawKnobInRect
:(
NSRect
)
knobRect
-
(
void
)
awakeFromNib
{
NSRect
image_rect
;
NSImage
*
img
=
[
NSImage
imageNamed
:
@"volume-slider-knob"
];
BOOL
b_dark
=
config_GetInt
(
VLCIntf
,
"macosx-interfacestyle"
);
if
(
b_dark
)
img
=
[
NSImage
imageNamed
:
@"volume-slider-knob_dark"
];
else
img
=
[
NSImage
imageNamed
:
@"volume-slider-knob"
];
image_rect
.
size
=
[
img
size
];
image_rect
.
origin
.
x
=
0
;
image_rect
.
origin
.
y
=
0
;
if
(
b_dark
)
image_rect
.
origin
.
y
=
-
1
;
else
image_rect
.
origin
.
y
=
0
;
}
-
(
void
)
drawKnobInRect
:(
NSRect
)
knobRect
{
knobRect
.
origin
.
x
+=
(
knobRect
.
size
.
width
-
image_rect
.
size
.
width
)
/
2
;
knobRect
.
size
.
width
=
image_rect
.
size
.
width
;
knobRect
.
size
.
height
=
image_rect
.
size
.
height
;
...
...
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