Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
3be591d4
Commit
3be591d4
authored
Dec 29, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: implement proper window button artwork (refs #5742)
parent
1fd47530
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
351 additions
and
74 deletions
+351
-74
Makefile.am
Makefile.am
+39
-9
extras/package/macosx/vlc.xcodeproj/project.pbxproj
extras/package/macosx/vlc.xcodeproj/project.pbxproj
+197
-52
modules/gui/macosx/MainWindowTitle.h
modules/gui/macosx/MainWindowTitle.h
+11
-0
modules/gui/macosx/MainWindowTitle.m
modules/gui/macosx/MainWindowTitle.m
+104
-13
No files found.
Makefile.am
View file @
3be591d4
...
...
@@ -275,23 +275,53 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow_dark/shuffle_dark.png
\
extras/package/macosx/Resources/mainwindow_dark/stop-pressed_dark.png
\
extras/package/macosx/Resources/mainwindow_dark/stop_dark.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-close-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-close-on-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-close-on.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-close-over-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-close-over.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-close.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-minimize-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-minimize-on-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-minimize-on.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-minimize-over.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-minimize-over-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-minimize.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-zoom-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-zoom-on-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-zoom-on.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-zoom-over-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-zoom-over.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-zoom.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-close-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-close-on-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-close-on.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-close-over-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-close-over.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-close.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-minimize-on-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-minimize-on.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-minimize-over-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-minimize-over.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-minimize-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-minimize.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-zoom-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-zoom-on-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-zoom-on.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-zoom-over-graphite.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-zoom-over.png
\
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-zoom.png
\
extras/package/macosx/Resources/mainwindow_dark/topbar-dark-center-fill.png
\
extras/package/macosx/Resources/mainwindow_dark/topbar-dark-left.png
\
extras/package/macosx/Resources/mainwindow_dark/topbar-dark-right.png
\
extras/package/macosx/Resources/mainwindow_dark/volume-high_dark.png
\
extras/package/macosx/Resources/mainwindow_dark/volume-low_dark.png
\
extras/package/macosx/Resources/mainwindow_dark/volume-slider-knob_dark.png
\
extras/package/macosx/Resources/mainwindow_dark/volume-slider-track_dark.png
\
extras/package/macosx/Resources/mainwindow_dark/window-close-on.png
\
extras/package/macosx/Resources/mainwindow_dark/window-close-over.png
\
extras/package/macosx/Resources/mainwindow_dark/window-close.png
\
extras/package/macosx/Resources/mainwindow_dark/window-fullscreen-on.png
\
extras/package/macosx/Resources/mainwindow_dark/window-fullscreen-over.png
\
extras/package/macosx/Resources/mainwindow_dark/window-fullscreen.png
\
extras/package/macosx/Resources/mainwindow_dark/window-minimize-on.png
\
extras/package/macosx/Resources/mainwindow_dark/window-minimize-over.png
\
extras/package/macosx/Resources/mainwindow_dark/window-minimize.png
\
extras/package/macosx/Resources/mainwindow_dark/window-resize.png
\
extras/package/macosx/Resources/mainwindow_dark/window-zoom-on.png
\
extras/package/macosx/Resources/mainwindow_dark/window-zoom-over.png
\
extras/package/macosx/Resources/mainwindow_dark/window-zoom.png
\
extras/package/macosx/Resources/noart.png
\
extras/package/macosx/Resources/prefs/spref_cone_Audio_64.png
\
extras/package/macosx/Resources/prefs/spref_cone_Hotkeys_64.png
\
...
...
extras/package/macosx/vlc.xcodeproj/project.pbxproj
View file @
3be591d4
This diff is collapsed.
Click to expand it.
modules/gui/macosx/MainWindowTitle.h
View file @
3be591d4
...
...
@@ -29,6 +29,16 @@
@interface
VLCMainWindowTitleView
:
NSImageView
{
NSImage
*
o_red_img
;
NSImage
*
o_red_over_img
;
NSImage
*
o_red_on_img
;
NSImage
*
o_yellow_img
;
NSImage
*
o_yellow_over_img
;
NSImage
*
o_yellow_on_img
;
NSImage
*
o_green_img
;
NSImage
*
o_green_over_img
;
NSImage
*
o_green_on_img
;
IBOutlet
id
o_red_btn
;
IBOutlet
id
o_yellow_btn
;
IBOutlet
id
o_green_btn
;
...
...
@@ -36,6 +46,7 @@
IBOutlet
id
o_title_lbl
;
}
-
(
void
)
loadButtonIcons
;
-
(
IBAction
)
buttonAction
:(
id
)
sender
;
-
(
void
)
setWindowTitle
:(
NSString
*
)
title
;
-
(
void
)
setFullscreenButtonHidden
:(
BOOL
)
b_value
;
...
...
modules/gui/macosx/MainWindowTitle.m
View file @
3be591d4
...
...
@@ -25,6 +25,7 @@
#import "intf.h"
#import "MainWindowTitle.h"
#import "CoreInteraction.h"
#import "CompatibilityFixes.h"
/*****************************************************************************
* VLCMainWindowTitleView
...
...
@@ -35,25 +36,44 @@
*****************************************************************************/
@implementation
VLCMainWindowTitleView
-
(
void
)
dealloc
{
[[
NSNotificationCenter
defaultCenter
]
removeObserver
:
self
];
[
o_red_img
release
];
[
o_red_over_img
release
];
[
o_red_on_img
release
];
[
o_yellow_img
release
];
[
o_yellow_over_img
release
];
[
o_yellow_on_img
release
];
[
o_green_img
release
];
[
o_green_over_img
release
];
[
o_green_on_img
release
];
[
super
dealloc
];
}
-
(
void
)
awakeFromNib
{
[
self
setImageScaling
:
NSScaleToFit
];
[
self
setImageFrameStyle
:
NSImageFrameNone
];
[
self
setImageAlignment
:
NSImageAlignCenter
];
[
self
setImage
:
[
NSImage
imageNamed
:
@"
bottom-background_dark
"
]];
[
self
setImage
:
[
NSImage
imageNamed
:
@"
topbar-dark-center-fill
"
]];
[
self
setAutoresizesSubviews
:
YES
];
[
o_red_btn
setImage
:
[
NSImage
imageNamed
:
@"window-close"
]];
[
o_red_btn
setAlternateImage
:
[
NSImage
imageNamed
:
@"window-close-on"
]];
[
self
loadButtonIcons
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
controlTintChanged
:
)
name
:
NSControlTintDidChangeNotification
object
:
nil
];
[
o_red_btn
setImage
:
o_red_img
];
[
o_red_btn
setAlternateImage
:
o_red_on_img
];
[[
o_red_btn
cell
]
setShowsBorderOnlyWhileMouseInside
:
YES
];
[[
o_red_btn
cell
]
setTag
:
0
];
[
o_yellow_btn
setImage
:
[
NSImage
imageNamed
:
@"window-minimize"
]
];
[
o_yellow_btn
setAlternateImage
:
[
NSImage
imageNamed
:
@"window-minimize-on"
]
];
[
o_yellow_btn
setImage
:
o_yellow_img
];
[
o_yellow_btn
setAlternateImage
:
o_yellow_on_img
];
[[
o_yellow_btn
cell
]
setShowsBorderOnlyWhileMouseInside
:
YES
];
[[
o_yellow_btn
cell
]
setTag
:
1
];
[
o_green_btn
setImage
:
[
NSImage
imageNamed
:
@"window-zoom"
]
];
[
o_green_btn
setAlternateImage
:
[
NSImage
imageNamed
:
@"window-zoom-on"
]
];
[
o_green_btn
setImage
:
o_green_img
];
[
o_green_btn
setAlternateImage
:
o_green_on_img
];
[[
o_green_btn
cell
]
setShowsBorderOnlyWhileMouseInside
:
YES
];
[[
o_green_btn
cell
]
setTag
:
2
];
[
o_fullscreen_btn
setImage
:
[
NSImage
imageNamed
:
@"window-fullscreen"
]];
...
...
@@ -62,6 +82,77 @@
[[
o_fullscreen_btn
cell
]
setTag
:
3
];
}
-
(
void
)
controlTintChanged
:(
NSNotification
*
)
notification
{
[
o_red_img
release
];
[
o_red_over_img
release
];
[
o_red_on_img
release
];
[
o_yellow_img
release
];
[
o_yellow_over_img
release
];
[
o_yellow_on_img
release
];
[
o_green_img
release
];
[
o_green_over_img
release
];
[
o_green_on_img
release
];
[
self
loadButtonIcons
];
[
o_red_btn
setNeedsDisplay
];
[
o_yellow_btn
setNeedsDisplay
];
[
o_green_btn
setNeedsDisplay
];
}
-
(
void
)
loadButtonIcons
{
if
(
OSX_LION
)
{
if
(
[
NSColor
currentControlTint
]
==
NSBlueControlTint
)
{
o_red_img
=
[[
NSImage
imageNamed
:
@"lion-window-close"
]
retain
];
o_red_over_img
=
[[
NSImage
imageNamed
:
@"lion-window-close-over"
]
retain
];
o_red_on_img
=
[[
NSImage
imageNamed
:
@"lion-window-close-on"
]
retain
];
o_yellow_img
=
[[
NSImage
imageNamed
:
@"lion-window-minimize"
]
retain
];
o_yellow_over_img
=
[[
NSImage
imageNamed
:
@"lion-window-minimize-over"
]
retain
];
o_yellow_on_img
=
[[
NSImage
imageNamed
:
@"lion-window-minimize-on"
]
retain
];
o_green_img
=
[[
NSImage
imageNamed
:
@"lion-window-zoom"
]
retain
];
o_green_over_img
=
[[
NSImage
imageNamed
:
@"lion-window-zoom-over"
]
retain
];
o_green_on_img
=
[[
NSImage
imageNamed
:
@"lion-window-zoom-on"
]
retain
];
}
else
{
o_red_img
=
[[
NSImage
imageNamed
:
@"lion-window-close-graphite"
]
retain
];
o_red_over_img
=
[[
NSImage
imageNamed
:
@"lion-window-close-over-graphite"
]
retain
];
o_red_on_img
=
[[
NSImage
imageNamed
:
@"lion-window-close-on-graphite"
]
retain
];
o_yellow_img
=
[[
NSImage
imageNamed
:
@"lion-window-minimize-graphite"
]
retain
];
o_yellow_over_img
=
[[
NSImage
imageNamed
:
@"lion-window-minimize-over-graphite"
]
retain
];
o_yellow_on_img
=
[[
NSImage
imageNamed
:
@"lion-window-minimize-on-graphite"
]
retain
];
o_green_img
=
[[
NSImage
imageNamed
:
@"lion-window-zoom-graphite"
]
retain
];
o_green_over_img
=
[[
NSImage
imageNamed
:
@"lion-window-zoom-over-graphite"
]
retain
];
o_green_on_img
=
[[
NSImage
imageNamed
:
@"lion-window-zoom-on-graphite"
]
retain
];
}
}
else
{
if
(
[
NSColor
currentControlTint
]
==
NSBlueControlTint
)
{
o_red_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-close"
]
retain
];
o_red_over_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-close-over"
]
retain
];
o_red_on_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-close-on"
]
retain
];
o_yellow_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-minimize"
]
retain
];
o_yellow_over_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-minimize-over"
]
retain
];
o_yellow_on_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-minimize-on"
]
retain
];
o_green_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-zoom"
]
retain
];
o_green_over_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-zoom-over"
]
retain
];
o_green_on_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-zoom-on"
]
retain
];
}
else
{
o_red_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-close-graphite"
]
retain
];
o_red_over_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-close-over-graphite"
]
retain
];
o_red_on_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-close-on-graphite"
]
retain
];
o_yellow_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-minimize-graphite"
]
retain
];
o_yellow_over_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-minimize-over-graphite"
]
retain
];
o_yellow_on_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-minimize-on-graphite"
]
retain
];
o_green_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-zoom-graphite"
]
retain
];
o_green_over_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-zoom-over-graphite"
]
retain
];
o_green_on_img
=
[[
NSImage
imageNamed
:
@"snowleo-window-zoom-on-graphite"
]
retain
];
}
}
}
-
(
BOOL
)
mouseDownCanMoveWindow
{
return
YES
;
...
...
@@ -98,15 +189,15 @@
{
if
(
b_value
)
{
[
o_red_btn
setImage
:
[
NSImage
imageNamed
:
@"window-close-over"
]
];
[
o_yellow_btn
setImage
:
[
NSImage
imageNamed
:
@"window-minimize-over"
]
];
[
o_green_btn
setImage
:
[
NSImage
imageNamed
:
@"window-zoom-over"
]
];
[
o_red_btn
setImage
:
o_red_over_img
];
[
o_yellow_btn
setImage
:
o_yellow_over_img
];
[
o_green_btn
setImage
:
o_green_over_img
];
}
else
{
[
o_red_btn
setImage
:
[
NSImage
imageNamed
:
@"window-close"
]
];
[
o_yellow_btn
setImage
:
[
NSImage
imageNamed
:
@"window-minimize"
]
];
[
o_green_btn
setImage
:
[
NSImage
imageNamed
:
@"window-zoom"
]
];
[
o_red_btn
setImage
:
o_red_img
];
[
o_yellow_btn
setImage
:
o_yellow_img
];
[
o_green_btn
setImage
:
o_green_img
];
}
}
...
...
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