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
ee6c4a29
Commit
ee6c4a29
authored
Feb 05, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: added a 1.5px shadow (white) to the window title and the time counter
parent
f8cdded4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
2 deletions
+67
-2
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+0
-1
modules/gui/macosx/MainWindowTitle.h
modules/gui/macosx/MainWindowTitle.h
+2
-0
modules/gui/macosx/MainWindowTitle.m
modules/gui/macosx/MainWindowTitle.m
+26
-1
modules/gui/macosx/misc.h
modules/gui/macosx/misc.h
+3
-0
modules/gui/macosx/misc.m
modules/gui/macosx/misc.m
+36
-0
No files found.
modules/gui/macosx/MainWindow.m
View file @
ee6c4a29
...
...
@@ -214,7 +214,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
o_shuffle_pressed_img
=
[[
NSImage
imageNamed
:
@"shuffle-pressed_dark"
]
retain
];
o_shuffle_on_img
=
[[
NSImage
imageNamed
:
@"shuffle-blue_dark"
]
retain
];
o_shuffle_on_pressed_img
=
[[
NSImage
imageNamed
:
@"shuffle-blue-pressed_dark"
]
retain
];
[
o_time_fld
setTextColor
:
[
NSColor
colorWithCalibratedRed
:
229
.
0
green
:
229
.
0
blue
:
229
.
0
alpha
:
100
.
0
]];
[
o_time_sld_background
setImagesLeft
:
[
NSImage
imageNamed
:
@"progression-track-wrapper-left_dark"
]
middle
:
[
NSImage
imageNamed
:
@"progression-track-wrapper-middle_dark"
]
right
:
[
NSImage
imageNamed
:
@"progression-track-wrapper-right_dark"
]];
[
o_volume_down_btn
setImage
:
[
NSImage
imageNamed
:
@"volume-low_dark"
]];
[
o_volume_track_view
setImage
:
[
NSImage
imageNamed
:
@"volume-slider-track_dark"
]];
...
...
modules/gui/macosx/MainWindowTitle.h
View file @
ee6c4a29
...
...
@@ -39,6 +39,8 @@
NSImage
*
o_green_img
;
NSImage
*
o_green_over_img
;
NSImage
*
o_green_on_img
;
NSShadow
*
o_window_title_shadow
;
NSDictionary
*
o_window_title_attributes_dict
;
IBOutlet
id
o_red_btn
;
IBOutlet
id
o_yellow_btn
;
...
...
modules/gui/macosx/MainWindowTitle.m
View file @
ee6c4a29
...
...
@@ -36,6 +36,13 @@
*****************************************************************************/
@implementation
VLCMainWindowTitleView
-
(
id
)
init
{
o_window_title_attributes_dict
=
[[
NSDictionary
dictionaryWithObjectsAndKeys
:
[
NSColor
whiteColor
],
NSForegroundColorAttributeName
,
[
NSFont
titleBarFontOfSize
:
12
.
0
],
NSFontAttributeName
,
nil
]
retain
];
return
[
super
init
];
}
-
(
void
)
dealloc
{
[[
NSNotificationCenter
defaultCenter
]
removeObserver
:
self
];
...
...
@@ -50,6 +57,9 @@
[
o_green_over_img
release
];
[
o_green_on_img
release
];
[
o_window_title_shadow
release
];
[
o_window_title_attributes_dict
release
];
[
super
dealloc
];
}
...
...
@@ -174,7 +184,22 @@
-
(
void
)
setWindowTitle
:(
NSString
*
)
title
{
[
o_title_lbl
setStringValue
:
title
];
if
(
!
o_window_title_shadow
)
{
o_window_title_shadow
=
[[
NSShadow
alloc
]
init
];
[
o_window_title_shadow
setShadowColor
:[
NSColor
colorWithCalibratedWhite
:
1
.
0
alpha
:
0
.
5
]];
[
o_window_title_shadow
setShadowOffset
:
NSMakeSize
(
0
.
0
,
-
1
.
5
)];
[
o_window_title_shadow
setShadowBlurRadius
:
0
.
5
];
[
o_window_title_shadow
retain
];
}
NSMutableAttributedString
*
o_attributed_title
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
title
attributes
:
o_window_title_attributes_dict
];
NSUInteger
i_titleLength
=
[
title
length
];
[
o_attributed_title
addAttribute
:
NSShadowAttributeName
value
:
o_window_title_shadow
range
:
NSMakeRange
(
0
,
i_titleLength
)];
[
o_attributed_title
setAlignment
:
NSCenterTextAlignment
range
:
NSMakeRange
(
0
,
i_titleLength
)];
[
o_title_lbl
setAttributedStringValue
:
o_attributed_title
];
[
o_attributed_title
release
];
}
-
(
void
)
setFullscreenButtonHidden
:(
BOOL
)
b_value
...
...
modules/gui/macosx/misc.h
View file @
ee6c4a29
...
...
@@ -151,7 +151,10 @@
@interface
VLCTimeField
:
NSTextField
{
NSShadow
*
o_string_shadow
;
NSDictionary
*
o_string_attributes_dict
;
}
-
(
BOOL
)
timeRemaining
;
@end
...
...
modules/gui/macosx/misc.m
View file @
ee6c4a29
...
...
@@ -707,6 +707,42 @@ void _drawFrameInRect(NSRect frameRect)
[
defaults
registerDefaults
:
appDefaults
];
}
-
(
void
)
awakeFromNib
{
NSColor
*
o_string_color
;
if
(
!
config_GetInt
(
VLCIntf
,
"macosx-interfacestyle"
))
o_string_color
=
[
NSColor
colorWithCalibratedRed
:
0
.
229
green
:
0
.
229
blue
:
0
.
229
alpha
:
100
.
0
];
else
o_string_color
=
[
NSColor
colorWithCalibratedRed
:
0
.
64
green
:
0
.
64
blue
:
0
.
64
alpha
:
100
.
0
];
o_string_attributes_dict
=
[[
NSDictionary
dictionaryWithObjectsAndKeys
:
o_string_color
,
NSForegroundColorAttributeName
,
[
NSFont
titleBarFontOfSize
:
10
.
0
],
NSFontAttributeName
,
nil
]
retain
];
}
-
(
void
)
dealloc
{
[
o_string_shadow
release
];
[
o_string_attributes_dict
release
];
}
-
(
void
)
setStringValue
:(
NSString
*
)
string
{
if
(
!
o_string_shadow
)
{
o_string_shadow
=
[[
NSShadow
alloc
]
init
];
[
o_string_shadow
setShadowColor
:
[
NSColor
colorWithCalibratedWhite
:
1
.
0
alpha
:
0
.
5
]];
[
o_string_shadow
setShadowOffset
:
NSMakeSize
(
0
.
0
,
-
1
.
5
)];
[
o_string_shadow
setShadowBlurRadius
:
0
.
0
];
}
NSMutableAttributedString
*
o_attributed_string
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
string
attributes
:
o_string_attributes_dict
];
NSUInteger
i_stringLength
=
[
string
length
];
[
o_attributed_string
addAttribute
:
NSShadowAttributeName
value
:
o_string_shadow
range
:
NSMakeRange
(
0
,
i_stringLength
)];
[
o_attributed_string
setAlignment
:
NSCenterTextAlignment
range
:
NSMakeRange
(
0
,
i_stringLength
)];
[
self
setAttributedStringValue
:
o_attributed_string
];
[
o_attributed_string
release
];
}
-
(
void
)
mouseDown
:
(
NSEvent
*
)
ourEvent
{
if
(
[
ourEvent
clickCount
]
>
1
)
...
...
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