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
e4c3b44d
Commit
e4c3b44d
authored
Jun 23, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: re-implemented time slider to fit the new style
clean up here and there
parent
2d689e40
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
280 additions
and
138 deletions
+280
-138
extras/package/macosx/Resources/English.lproj/MainMenu.nib/designable.nib
...acosx/Resources/English.lproj/MainMenu.nib/designable.nib
+222
-127
extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
...osx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
+0
-0
modules/gui/macosx/controls.h
modules/gui/macosx/controls.h
+1
-4
modules/gui/macosx/controls.m
modules/gui/macosx/controls.m
+5
-6
modules/gui/macosx/misc.h
modules/gui/macosx/misc.h
+15
-1
modules/gui/macosx/misc.m
modules/gui/macosx/misc.m
+37
-0
No files found.
extras/package/macosx/Resources/English.lproj/MainMenu.nib/designable.nib
View file @
e4c3b44d
This diff is collapsed.
Click to expand it.
extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
View file @
e4c3b44d
No preview for this file type
modules/gui/macosx/controls.h
View file @
e4c3b44d
...
...
@@ -35,11 +35,8 @@
IBOutlet
id
o_volumeslider
;
IBOutlet
id
o_btn_shuffle
;
IBOutlet
id
o_btn_addNode
;
IBOutlet
id
o_btn_repeat
;
IBOutlet
id
o_btn_repeat_embed
;
IBOutlet
id
o_btn_shuffle_embed
;
IBOutlet
id
o_btn_shuffle
;
IBOutlet
id
o_specificTime_cancel_btn
;
IBOutlet
id
o_specificTime_enter_fld
;
...
...
modules/gui/macosx/controls.m
View file @
e4c3b44d
...
...
@@ -174,6 +174,7 @@
//vout_OSDMessage( p_intf, SPU_DEFAULT_CHANNEL, "%s", _( "Random Off" ) );
config_PutInt
(
p_playlist
,
"random"
,
0
);
}
[
self
shuffle
];
p_intf
->
p_sys
->
b_playmode_update
=
true
;
p_intf
->
p_sys
->
b_intf_update
=
true
;
...
...
@@ -200,17 +201,15 @@
vlc_value_t
val
;
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
var_Get
(
p_playlist
,
"random"
,
&
val
);
[
o_btn_shuffle
setState
:
val
.
b_bool
];
if
(
val
.
b_bool
)
{
[
o_btn_shuffle
_embed
setImage
:
[
NSImage
imageNamed
:
@"shuffle-on"
]];
[
o_btn_shuffle
_embed
setAlternativ
eImage
:
[
NSImage
imageNamed
:
@"shuffle-blue-pressed"
]];
[
o_btn_shuffle
setImage
:
[
NSImage
imageNamed
:
@"shuffle-on"
]];
[
o_btn_shuffle
setAlternat
eImage
:
[
NSImage
imageNamed
:
@"shuffle-blue-pressed"
]];
}
else
{
[
o_btn_shuffle
_embed
setImage
:
[
NSImage
imageNamed
:
@"shuffle"
]];
[
o_btn_shuffle
_embed
set
Image
:
[
NSImage
imageNamed
:
@"shuffle-pressed"
]];
[
o_btn_shuffle
setImage
:
[
NSImage
imageNamed
:
@"shuffle"
]];
[
o_btn_shuffle
setAlternate
Image
:
[
NSImage
imageNamed
:
@"shuffle-pressed"
]];
}
}
-
(
IBAction
)
repeatButtonAction
:(
id
)
sender
...
...
modules/gui/macosx/misc.h
View file @
e4c3b44d
/*****************************************************************************
* misc.h: code not specific to vlc
*****************************************************************************
* Copyright (C) 2003-20
07
the VideoLAN team
* Copyright (C) 2003-20
11
the VideoLAN team
* $Id$
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Felix Paul Kühne <fkuehne at videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -130,6 +131,19 @@
@end
/*****************************************************************************
* TimeLineSlider
*****************************************************************************/
@interface
TimeLineSlider
:
NSSlider
{
}
-
(
void
)
drawRect
:(
NSRect
)
rect
;
-
(
void
)
drawKnobInRect
:(
NSRect
)
knobRect
;
@end
/*****************************************************************************
* ITSlider
*****************************************************************************/
...
...
modules/gui/macosx/misc.m
View file @
e4c3b44d
...
...
@@ -434,6 +434,9 @@ static NSMutableArray *blackoutWindows = NULL;
}
*/
/* we want to be moveable regardless of our style */
[
self
setMovableByWindowBackground
:
YES
];
/* we don't want this window to be restored on relaunch */
if
([
self
respondsToSelector
:
@selector
(
setRestorable
:)])
[
self
setRestorable
:
NO
];
...
...
@@ -688,6 +691,40 @@ void _drawFrameInRect(NSRect frameRect)
@end
/*****************************************************************************
* TimeLineSlider
*****************************************************************************/
@implementation
TimeLineSlider
-
(
void
)
drawKnobInRect
:(
NSRect
)
knobRect
{
NSRect
image_rect
;
NSImage
*
img
=
[
NSImage
imageNamed
:
@"progression-knob"
];
image_rect
.
size
=
[
img
size
];
image_rect
.
origin
.
x
=
0
;
image_rect
.
origin
.
y
=
0
;
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
;
[
img
drawInRect
:
knobRect
fromRect
:
image_rect
operation
:
NSCompositeSourceOver
fraction
:
1
];
}
-
(
void
)
drawRect
:(
NSRect
)
rect
{
/* Draw default to make sure the slider behaves correctly */
[[
NSGraphicsContext
currentContext
]
saveGraphicsState
];
NSRectClip
(
NSZeroRect
);
[
super
drawRect
:
rect
];
[[
NSGraphicsContext
currentContext
]
restoreGraphicsState
];
NSRect
knobRect
=
[[
self
cell
]
knobRectFlipped
:
NO
];
knobRect
.
origin
.
y
+=
1
;
// [[[NSColor blackColor] colorWithAlphaComponent:0.6] set];
[
self
drawKnobInRect
:
knobRect
];
}
@end
/*****************************************************************************
* ITSlider
...
...
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