Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Steve Lhomme
vlc
Commits
6b11e863
Commit
6b11e863
authored
Feb 26, 2017
by
Cameron Mozie
Committed by
Marvin Scholz
Feb 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macOS: Add image button classes
parent
297c8bbf
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
158 additions
and
16 deletions
+158
-16
extras/package/macosx/VLC.xcodeproj/project.pbxproj
extras/package/macosx/VLC.xcodeproj/project.pbxproj
+14
-2
modules/gui/macosx/Makefile.am
modules/gui/macosx/Makefile.am
+3
-1
modules/gui/macosx/UI/VLCFullScreenPanel.xib
modules/gui/macosx/UI/VLCFullScreenPanel.xib
+9
-9
modules/gui/macosx/VLCFSPanelController.m
modules/gui/macosx/VLCFSPanelController.m
+0
-4
modules/gui/macosx/VLCHUDImageButton.h
modules/gui/macosx/VLCHUDImageButton.h
+28
-0
modules/gui/macosx/VLCHUDImageButton.m
modules/gui/macosx/VLCHUDImageButton.m
+38
-0
modules/gui/macosx/VLCHUDToggleButton.h
modules/gui/macosx/VLCHUDToggleButton.h
+28
-0
modules/gui/macosx/VLCHUDToggleButton.m
modules/gui/macosx/VLCHUDToggleButton.m
+38
-0
No files found.
extras/package/macosx/VLC.xcodeproj/project.pbxproj
View file @
6b11e863
...
...
@@ -165,6 +165,8 @@
1C3114281E508D1B00D4DD76
/* VLCFullScreenPanel.xib in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
6B8224181E4D2A9000833BE1
/* VLCFullScreenPanel.xib */
;
};
1C3114291E508D1B00D4DD76
/* VLCRendererDialog.xib in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
6B8224191E4D2A9000833BE1
/* VLCRendererDialog.xib */
;
};
1C31142A1E508D1B00D4DD76
/* VLCStatusBarIconMainMenu.xib in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
6B82241A1E4D2A9000833BE1
/* VLCStatusBarIconMainMenu.xib */
;
};
6B3BE42C1E6217CB008D098A
/* VLCHUDImageButton.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
6B3BE42B1E6217CB008D098A
/* VLCHUDImageButton.m */
;
};
6B3BE4321E621F24008D098A
/* VLCHUDToggleButton.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
6B3BE4311E621F24008D098A
/* VLCHUDToggleButton.m */
;
};
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
...
...
@@ -195,6 +197,10 @@
633121CB1B51122700E636DA
/* VLCResumeDialogController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
VLCResumeDialogController.m
;
sourceTree
=
"<group>"
;
};
6B13E2A61BC67678001AD24A
/* VLCScrollingClipView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
VLCScrollingClipView.h
;
sourceTree
=
"<group>"
;
};
6B13E2A71BC67678001AD24A
/* VLCScrollingClipView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
VLCScrollingClipView.m
;
sourceTree
=
"<group>"
;
};
6B3BE42A1E6217CB008D098A
/* VLCHUDImageButton.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
VLCHUDImageButton.h
;
sourceTree
=
"<group>"
;
};
6B3BE42B1E6217CB008D098A
/* VLCHUDImageButton.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
VLCHUDImageButton.m
;
sourceTree
=
"<group>"
;
};
6B3BE4301E621F24008D098A
/* VLCHUDToggleButton.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
VLCHUDToggleButton.h
;
sourceTree
=
"<group>"
;
};
6B3BE4311E621F24008D098A
/* VLCHUDToggleButton.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
VLCHUDToggleButton.m
;
sourceTree
=
"<group>"
;
};
6B6A499A1DFD9B23009128AC
/* VLCDefaultValueSlider.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
VLCDefaultValueSlider.h
;
sourceTree
=
"<group>"
;
};
6B6A499B1DFD9B23009128AC
/* VLCDefaultValueSlider.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
VLCDefaultValueSlider.m
;
sourceTree
=
"<group>"
;
};
6B6A499C1DFD9B23009128AC
/* VLCDefaultValueSliderCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
VLCDefaultValueSliderCell.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -922,6 +928,10 @@
08FB77AFFE84173DC02AAC07
/* Classes */
=
{
isa
=
PBXGroup
;
children
=
(
6B3BE42A1E6217CB008D098A
/* VLCHUDImageButton.h */
,
6B3BE42B1E6217CB008D098A
/* VLCHUDImageButton.m */
,
6B3BE4301E621F24008D098A
/* VLCHUDToggleButton.h */
,
6B3BE4311E621F24008D098A
/* VLCHUDToggleButton.m */
,
1C67C8A61D58C0A40079E1C1
/* VLCAboutWindowController.h */
,
1C67C8A71D58C0A40079E1C1
/* VLCAboutWindowController.m */
,
1C67C8A31D58C0980079E1C1
/* VLCHelpWindowController.h */
,
...
...
@@ -1879,7 +1889,7 @@
};
};
};
buildConfigurationList
=
C2F2A6EA09588F1B00018C74
/* Build configuration list for PBXProject "
vlc
" */
;
buildConfigurationList
=
C2F2A6EA09588F1B00018C74
/* Build configuration list for PBXProject "
VLC
" */
;
compatibilityVersion
=
"Xcode 3.2"
;
developmentRegion
=
English
;
hasScannedForEncodings
=
1
;
...
...
@@ -1905,6 +1915,7 @@
buildActionMask
=
2147483647
;
files
=
(
1C31140E1E508D1B00D4DD76
/* About.xib in Sources */
,
6B3BE42C1E6217CB008D098A
/* VLCHUDImageButton.m in Sources */
,
1C31140F1E508D1B00D4DD76
/* AddonManager.xib in Sources */
,
1C3114101E508D1B00D4DD76
/* AudioEffects.xib in Sources */
,
1C3114111E508D1B00D4DD76
/* Bookmarks.xib in Sources */
,
...
...
@@ -1954,6 +1965,7 @@
1C3113F01E508C7600D4DD76
/* VLCRendererItem.h in Sources */
,
1C3113F11E508C7600D4DD76
/* VLCRendererItem.m in Sources */
,
1C3113F21E508C7600D4DD76
/* VLCRendererDialog.h in Sources */
,
6B3BE4321E621F24008D098A
/* VLCHUDToggleButton.m in Sources */
,
1C3113F31E508C7600D4DD76
/* VLCRendererDialog.m in Sources */
,
1C3113F41E508C7600D4DD76
/* VLCHUDTextFieldCell.h in Sources */
,
1C3113F51E508C7600D4DD76
/* VLCHUDTextFieldCell.m in Sources */
,
...
...
@@ -2218,7 +2230,7 @@
defaultConfigurationIsVisible
=
0
;
defaultConfigurationName
=
Default
;
};
C2F2A6EA09588F1B00018C74
/* Build configuration list for PBXProject "
vlc
" */
=
{
C2F2A6EA09588F1B00018C74
/* Build configuration list for PBXProject "
VLC
" */
=
{
isa
=
XCConfigurationList
;
buildConfigurations
=
(
C2F2A6EB09588F1B00018C74
/* Development */
,
...
...
modules/gui/macosx/Makefile.am
View file @
6b11e863
...
...
@@ -92,7 +92,9 @@ libmacosx_plugin_la_SOURCES = \
VLCFSPanelController.h VLCFSPanelController.m
\
VLCFSPanelDraggableView.h VLCFSPanelDraggableView.m
\
VLCDefaultValueSlider.h VLCDefaultValueSlider.m
\
VLCDefaultValueSliderCell.h VLCDefaultValueSliderCell.m
VLCDefaultValueSliderCell.h VLCDefaultValueSliderCell.m
\
VLCHUDImageButton.h VLCHUDImageButton.m
\
VLCHUDToggleButton.h VLCHUDToggleButton.m
nobase_libmacosx_plugin_la_DATA
=
\
UI/About.nib
\
...
...
modules/gui/macosx/UI/VLCFullScreenPanel.xib
View file @
6b11e863
<?xml version="1.0" encoding="UTF-8"
standalone="no"
?>
<document
type=
"com.apple.InterfaceBuilder3.Cocoa.XIB"
version=
"3.0"
toolsVersion=
"1
1542"
systemVersion=
"15G1217
"
targetRuntime=
"MacOSX.Cocoa"
propertyAccessControl=
"none"
useAutolayout=
"YES"
customObjectInstantitationMethod=
"direct"
>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.Cocoa.XIB"
version=
"3.0"
toolsVersion=
"1
2100"
systemVersion=
"16D32
"
targetRuntime=
"MacOSX.Cocoa"
propertyAccessControl=
"none"
useAutolayout=
"YES"
customObjectInstantitationMethod=
"direct"
>
<dependencies>
<deployment
identifier=
"macosx"
/>
<development
version=
"7000"
identifier=
"xcode"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.CocoaPlugin"
version=
"1
1542
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.CocoaPlugin"
version=
"1
2100
"
/>
<capability
name=
"Aspect ratio constraints"
minToolsVersion=
"5.1"
/>
<capability
name=
"system font weights other than Regular or Bold"
minToolsVersion=
"7.0"
/>
</dependencies>
...
...
@@ -42,7 +42,7 @@
<customView
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"VLH-qy-cwr"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"480"
height=
"42"
/>
<subviews>
<button
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"YSL-bH-k6U"
>
<button
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"YSL-bH-k6U"
customClass=
"VLCHUDToggleButton"
>
<rect
key=
"frame"
x=
"226"
y=
"7"
width=
"35"
height=
"29"
/>
<constraints>
<constraint
firstAttribute=
"width"
secondItem=
"YSL-bH-k6U"
secondAttribute=
"height"
multiplier=
"1:1"
constant=
"6"
id=
"2if-S8-t0u"
/>
...
...
@@ -55,7 +55,7 @@
<action
selector=
"togglePlayPause:"
target=
"-2"
id=
"9os-DP-jAN"
/>
</connections>
</button>
<button
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"jSN-hV-r5D"
>
<button
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"jSN-hV-r5D"
customClass=
"VLCHUDImageButton"
>
<rect
key=
"frame"
x=
"263"
y=
"7"
width=
"34"
height=
"29"
/>
<constraints>
<constraint
firstAttribute=
"width"
secondItem=
"jSN-hV-r5D"
secondAttribute=
"height"
multiplier=
"19:16"
id=
"m1w-9i-bkp"
/>
...
...
@@ -68,7 +68,7 @@
<action
selector=
"jumpForward:"
target=
"-2"
id=
"bjn-qc-BJ7"
/>
</connections>
</button>
<button
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"7QH-jb-QdM"
>
<button
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"7QH-jb-QdM"
customClass=
"VLCHUDImageButton"
>
<rect
key=
"frame"
x=
"189"
y=
"7"
width=
"35"
height=
"29"
/>
<constraints>
<constraint
firstAttribute=
"width"
secondItem=
"7QH-jb-QdM"
secondAttribute=
"height"
multiplier=
"19:16"
id=
"isk-o2-kZY"
/>
...
...
@@ -93,7 +93,7 @@
<action
selector=
"volumeSliderUpdate:"
target=
"-2"
id=
"doI-qM-Pde"
/>
</connections>
</slider>
<button
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"2ai-dB-Wpq"
>
<button
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"2ai-dB-Wpq"
customClass=
"VLCHUDImageButton"
>
<rect
key=
"frame"
x=
"299"
y=
"7"
width=
"34"
height=
"29"
/>
<constraints>
<constraint
firstAttribute=
"width"
secondItem=
"2ai-dB-Wpq"
secondAttribute=
"height"
multiplier=
"19:16"
id=
"Itj-7f-YDa"
/>
...
...
@@ -106,7 +106,7 @@
<action
selector=
"gotoNext:"
target=
"-2"
id=
"flJ-52-Pcb"
/>
</connections>
</button>
<button
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"TVM-DT-2yo"
>
<button
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"TVM-DT-2yo"
customClass=
"VLCHUDImageButton"
>
<rect
key=
"frame"
x=
"153"
y=
"7"
width=
"34"
height=
"29"
/>
<constraints>
<constraint
firstAttribute=
"width"
secondItem=
"TVM-DT-2yo"
secondAttribute=
"height"
multiplier=
"19:16"
id=
"oKb-iw-6S1"
/>
...
...
@@ -130,7 +130,7 @@
<font
key=
"font"
metaFont=
"system"
/>
</buttonCell>
</button>
<button
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"C5K-aX-3aJ"
>
<button
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"C5K-aX-3aJ"
customClass=
"VLCHUDImageButton"
>
<rect
key=
"frame"
x=
"438"
y=
"10"
width=
"22"
height=
"22"
/>
<constraints>
<constraint
firstAttribute=
"width"
secondItem=
"C5K-aX-3aJ"
secondAttribute=
"height"
multiplier=
"1:1"
id=
"VWl-0x-p1I"
/>
...
...
modules/gui/macosx/VLCFSPanelController.m
View file @
6b11e863
...
...
@@ -92,10 +92,6 @@ static NSString *kAssociatedFullscreenRect = @"VLCFullscreenAssociatedWindowRect
[
self
injectBackgroundView
];
#endif
/* TODO: Write custom Image-only button subclass to behave properly */
[(
NSButtonCell
*
)[
_playPauseButton
cell
]
setHighlightsBy
:
NSPushInCellMask
];
[(
NSButtonCell
*
)[
_playPauseButton
cell
]
setShowsStateBy
:
NSContentsCellMask
];
[
self
setupControls
];
}
...
...
modules/gui/macosx/VLCHUDImageButton.h
0 → 100644
View file @
6b11e863
/*****************************************************************************
* VLCHUDImageButton.h
*****************************************************************************
* Copyright (C) 2017 VLC authors and VideoLAN
* $Id$
*
* Authors: Cameron Mozie <camsw0rld14@gmail.com>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <Cocoa/Cocoa.h>
@interface
VLCHUDImageButton
:
NSButton
@end
modules/gui/macosx/VLCHUDImageButton.m
0 → 100644
View file @
6b11e863
/*****************************************************************************
* VLCHUDImageButton.m
*****************************************************************************
* Copyright (C) 2017 VLC authors and VideoLAN
* $Id$
*
* Authors: Cameron Mozie <camsw0rld14@gmail.com>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "VLCHUDImageButton.h"
@implementation
VLCHUDImageButton
-
(
instancetype
)
initWithCoder
:(
NSCoder
*
)
coder
{
self
=
[
super
initWithCoder
:
coder
];
if
(
self
)
{
[(
NSButtonCell
*
)[
self
cell
]
setHighlightsBy
:
NSPushInCellMask
];
[(
NSButtonCell
*
)[
self
cell
]
setShowsStateBy
:
NSNoCellMask
];
}
return
self
;
}
@end
modules/gui/macosx/VLCHUDToggleButton.h
0 → 100644
View file @
6b11e863
/*****************************************************************************
* VLCHUDToggleButton.h
*****************************************************************************
* Copyright (C) 2017 VLC authors and VideoLAN
* $Id$
*
* Authors: Cameron Mozie <camsw0rld14@gmail.com>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "VLCHUDImageButton.h"
@interface
VLCHUDToggleButton
:
VLCHUDImageButton
@end
modules/gui/macosx/VLCHUDToggleButton.m
0 → 100644
View file @
6b11e863
/*****************************************************************************
* VLCHUDToggleButton.h
*****************************************************************************
* Copyright (C) 2017 VLC authors and VideoLAN
* $Id$
*
* Authors: Cameron Mozie <camsw0rld14@gmail.com>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "VLCHUDToggleButton.h"
@implementation
VLCHUDToggleButton
-
(
instancetype
)
initWithCoder
:(
NSCoder
*
)
coder
{
self
=
[
super
initWithCoder
:
coder
];
if
(
self
)
{
[(
NSButtonCell
*
)[
self
cell
]
setHighlightsBy
:
NSPushInCellMask
];
[(
NSButtonCell
*
)[
self
cell
]
setShowsStateBy
:
NSContentsCellMask
];
}
return
self
;
}
@end
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