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
7dd80de5
Commit
7dd80de5
authored
Jan 18, 2014
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: advanced prefs: remove scroll view from module list table view, fix layout
close #9971
parent
65a983cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
55 deletions
+46
-55
modules/gui/macosx/prefs_widgets.m
modules/gui/macosx/prefs_widgets.m
+46
-55
No files found.
modules/gui/macosx/prefs_widgets.m
View file @
7dd80de5
...
...
@@ -2050,7 +2050,51 @@ else\
}
/* FOR i_module_index */
module_list_free
(
p_list
);
mainFrame
.
size
.
height
=
30
+
20
*
[
o_modulearray
count
];
// First, initialize and draw the table view to get its height
NSRect
s_rc
=
NSMakeRect
(
12
,
10
,
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
,
50
);
// height is automatically increased as needed
NSTableView
*
o_tableview
;
o_tableview
=
[[
NSTableView
alloc
]
initWithFrame
:
s_rc
];
[
o_tableview
setUsesAlternatingRowBackgroundColors
:
YES
];
[
o_tableview
setHeaderView
:
nil
];
/* FIXME: support for multiple selection... */
// [o_tableview setAllowsMultipleSelection:YES];
NSCell
*
o_headerCell
=
[[
NSCell
alloc
]
initTextCell
:
@"Enabled"
];
NSCell
*
o_dataCell
=
[[
NSButtonCell
alloc
]
init
];
[(
NSButtonCell
*
)
o_dataCell
setButtonType
:
NSSwitchButton
];
[
o_dataCell
setTitle
:
@""
];
[
o_dataCell
setFont
:[
NSFont
systemFontOfSize
:
0
]];
NSTableColumn
*
o_tableColumn
=
[[
NSTableColumn
alloc
]
initWithIdentifier:
@"Enabled"
];
[
o_tableColumn
setHeaderCell
:
o_headerCell
];
[
o_tableColumn
setDataCell
:
o_dataCell
];
[
o_tableColumn
setWidth
:
17
];
[
o_tableview
addTableColumn
:
o_tableColumn
];
o_headerCell
=
[[
NSCell
alloc
]
initTextCell
:
@"Module Name"
];
o_dataCell
=
[[
NSTextFieldCell
alloc
]
init
];
[
o_dataCell
setFont
:[
NSFont
systemFontOfSize
:
12
]];
o_tableColumn
=
[[
NSTableColumn
alloc
]
initWithIdentifier:
@"Module"
];
[
o_tableColumn
setHeaderCell
:
o_headerCell
];
[
o_tableColumn
setDataCell
:
o_dataCell
];
[
o_tableColumn
setWidth
:
s_rc
.
size
.
width
-
34
];
[
o_tableview
addTableColumn
:
o_tableColumn
];
[
o_tableview
registerForDraggedTypes
:[
NSArray
arrayWithObject
:
@"VLC media player module"
]];
[
o_tableview
setDataSource
:
self
];
[
o_tableview
setTarget
:
self
];
[
o_tableview
setAction
:
@selector
(
tableChanged
:)];
[
o_tableview
sendActionOn
:
NSLeftMouseUpMask
|
NSLeftMouseDownMask
|
NSLeftMouseDraggedMask
];
[
o_tableview
reloadData
];
CGFloat
tableview_height
=
[
o_tableview
frame
].
size
.
height
;
mainFrame
.
size
.
height
=
40
+
tableview_height
;
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
0
;
...
...
@@ -2079,60 +2123,7 @@ else\
[
o_textfield
setAutoresizingMask
:
NSViewWidthSizable
];
[
self
addSubview
:
o_textfield
];
{
NSRect
s_rc
=
mainFrame
;
s_rc
.
size
.
height
=
mainFrame
.
size
.
height
-
30
;
s_rc
.
size
.
width
=
mainFrame
.
size
.
width
-
12
;
s_rc
.
origin
.
x
=
12
;
s_rc
.
origin
.
y
=
0
;
o_scrollview
=
[[[
NSScrollView
alloc
]
initWithFrame
:
s_rc
]
retain
];
[
o_scrollview
setDrawsBackground
:
NO
];
[
o_scrollview
setBorderType
:
NSBezelBorder
];
[
o_scrollview
setAutohidesScrollers
:
YES
];
NSTableView
*
o_tableview
;
o_tableview
=
[[
NSTableView
alloc
]
initWithFrame
:
s_rc
];
[
o_tableview
setUsesAlternatingRowBackgroundColors
:
YES
];
[
o_tableview
setHeaderView
:
nil
];
/* TODO: find a good way to fix the row height and text size*/
/* FIXME: support for multiple selection... */
// [o_tableview setAllowsMultipleSelection:YES];
NSCell
*
o_headerCell
=
[[
NSCell
alloc
]
initTextCell
:
@"Enabled"
];
NSCell
*
o_dataCell
=
[[
NSButtonCell
alloc
]
init
];
[(
NSButtonCell
*
)
o_dataCell
setButtonType
:
NSSwitchButton
];
[
o_dataCell
setTitle
:
@""
];
[
o_dataCell
setFont
:[
NSFont
systemFontOfSize
:
0
]];
NSTableColumn
*
o_tableColumn
=
[[
NSTableColumn
alloc
]
initWithIdentifier:
@"Enabled"
];
[
o_tableColumn
setHeaderCell
:
o_headerCell
];
[
o_tableColumn
setDataCell
:
o_dataCell
];
[
o_tableColumn
setWidth
:
17
];
[
o_tableview
addTableColumn
:
o_tableColumn
];
o_headerCell
=
[[
NSCell
alloc
]
initTextCell
:
@"Module Name"
];
o_dataCell
=
[[
NSTextFieldCell
alloc
]
init
];
[
o_dataCell
setFont
:[
NSFont
systemFontOfSize
:
12
]];
o_tableColumn
=
[[
NSTableColumn
alloc
]
initWithIdentifier:
@"Module"
];
[
o_tableColumn
setHeaderCell
:
o_headerCell
];
[
o_tableColumn
setDataCell
:
o_dataCell
];
[
o_tableColumn
setWidth
:
s_rc
.
size
.
width
-
34
];
[
o_tableview
addTableColumn
:
o_tableColumn
];
[
o_tableview
registerForDraggedTypes
:[
NSArray
arrayWithObject
:
@"VLC media player module"
]];
[
o_tableview
setDataSource
:
self
];
[
o_tableview
setTarget
:
self
];
[
o_tableview
setAction
:
@selector
(
tableChanged
:)];
[
o_tableview
sendActionOn
:
NSLeftMouseUpMask
|
NSLeftMouseDownMask
|
NSLeftMouseDraggedMask
];
[
o_scrollview
setDocumentView
:
o_tableview
];
}
[
o_scrollview
setAutoresizingMask
:
NSViewWidthSizable
];
[
o_scrollview
setAutohidesScrollers
:
YES
];
[
self
addSubview
:
o_scrollview
];
[
self
addSubview
:
o_tableview
];
}
return
self
;
}
...
...
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