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
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
Show 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,52 +2050,14 @@ else\
...
@@ -2050,52 +2050,14 @@ else\
}
/* FOR i_module_index */
}
/* FOR i_module_index */
module_list_free
(
p_list
);
module_list_free
(
p_list
);
mainFrame
.
size
.
height
=
30
+
20
*
[
o_modulearray
count
];
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
0
;
if
([
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
i_view_type
=
CONFIG_ITEM_MODULE_LIST
;
o_tooltip
=
[[
VLCStringUtility
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
/* add the label */
if
(
p_item
->
psz_text
)
o_labelString
=
_NS
((
char
*
)
p_item
->
psz_text
);
else
o_labelString
=
@""
;
ADD_LABEL
(
o_label
,
mainFrame
,
0
,
-
3
,
o_labelString
,
o_tooltip
)
[
o_label
setAutoresizingMask
:
NSViewNotSizable
];
[
self
addSubview
:
o_label
];
/* build the textfield */
if
(
p_item
->
value
.
psz
)
o_textfieldString
=
_NS
((
char
*
)
p_item
->
value
.
psz
);
else
o_textfieldString
=
@""
;
ADD_TEXTFIELD
(
o_textfield
,
mainFrame
,
[
o_label
frame
].
size
.
width
+
2
,
mainFrame
.
size
.
height
-
22
,
mainFrame
.
size
.
width
-
[
o_label
frame
].
size
.
width
-
2
,
o_tooltip
,
o_textfieldString
)
[
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
];
// 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
;
NSTableView
*
o_tableview
;
o_tableview
=
[[
NSTableView
alloc
]
initWithFrame
:
s_rc
];
o_tableview
=
[[
NSTableView
alloc
]
initWithFrame
:
s_rc
];
[
o_tableview
setUsesAlternatingRowBackgroundColors
:
YES
];
[
o_tableview
setUsesAlternatingRowBackgroundColors
:
YES
];
[
o_tableview
setHeaderView
:
nil
];
[
o_tableview
setHeaderView
:
nil
];
/* TODO: find a good way to fix the row height and text size*/
/* FIXME: support for multiple selection... */
/* FIXME: support for multiple selection... */
// [o_tableview setAllowsMultipleSelection:YES];
// [o_tableview setAllowsMultipleSelection:YES];
...
@@ -2127,12 +2089,41 @@ else\
...
@@ -2127,12 +2089,41 @@ else\
[
o_tableview
setAction
:
@selector
(
tableChanged
:)];
[
o_tableview
setAction
:
@selector
(
tableChanged
:)];
[
o_tableview
sendActionOn
:
NSLeftMouseUpMask
|
NSLeftMouseDownMask
|
[
o_tableview
sendActionOn
:
NSLeftMouseUpMask
|
NSLeftMouseDownMask
|
NSLeftMouseDraggedMask
];
NSLeftMouseDraggedMask
];
[
o_scrollview
setDocumentView
:
o_tableview
];
}
[
o_scrollview
setAutoresizingMask
:
NSViewWidthSizable
];
[
o_scrollview
setAutohidesScrollers
:
YES
];
[
self
addSubview
:
o_scrollview
];
[
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
;
if
([
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
i_view_type
=
CONFIG_ITEM_MODULE_LIST
;
o_tooltip
=
[[
VLCStringUtility
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
/* add the label */
if
(
p_item
->
psz_text
)
o_labelString
=
_NS
((
char
*
)
p_item
->
psz_text
);
else
o_labelString
=
@""
;
ADD_LABEL
(
o_label
,
mainFrame
,
0
,
-
3
,
o_labelString
,
o_tooltip
)
[
o_label
setAutoresizingMask
:
NSViewNotSizable
];
[
self
addSubview
:
o_label
];
/* build the textfield */
if
(
p_item
->
value
.
psz
)
o_textfieldString
=
_NS
((
char
*
)
p_item
->
value
.
psz
);
else
o_textfieldString
=
@""
;
ADD_TEXTFIELD
(
o_textfield
,
mainFrame
,
[
o_label
frame
].
size
.
width
+
2
,
mainFrame
.
size
.
height
-
22
,
mainFrame
.
size
.
width
-
[
o_label
frame
].
size
.
width
-
2
,
o_tooltip
,
o_textfieldString
)
[
o_textfield
setAutoresizingMask
:
NSViewWidthSizable
];
[
self
addSubview
:
o_textfield
];
[
self
addSubview
:
o_tableview
];
}
}
return
self
;
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