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
9ee5c170
Commit
9ee5c170
authored
May 05, 2003
by
Eric Petit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modules/gui/beos/*: Partial fix for Preferences resizing
parent
fee6852a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
17 deletions
+39
-17
modules/gui/beos/InterfaceWindow.cpp
modules/gui/beos/InterfaceWindow.cpp
+6
-1
modules/gui/beos/PreferencesWindow.cpp
modules/gui/beos/PreferencesWindow.cpp
+31
-14
modules/gui/beos/PreferencesWindow.h
modules/gui/beos/PreferencesWindow.h
+2
-2
No files found.
modules/gui/beos/InterfaceWindow.cpp
View file @
9ee5c170
...
...
@@ -2,7 +2,7 @@
* InterfaceWindow.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: InterfaceWindow.cpp,v 1.3
5 2003/05/03 13:37:21
titer Exp $
* $Id: InterfaceWindow.cpp,v 1.3
6 2003/05/05 13:06:02
titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -966,7 +966,12 @@ InterfaceWindow::_RestoreSettings()
if
(
fSettings
->
FindRect
(
"messages frame"
,
&
frame
)
==
B_OK
)
set_window_pos
(
fMessagesWindow
,
frame
);
if
(
fSettings
->
FindRect
(
"settings frame"
,
&
frame
)
==
B_OK
)
{
/* FIXME: Preferences horizontal resizing doesn't work
correctly now */
frame
.
right
=
frame
.
left
+
fPreferencesWindow
->
Frame
().
Width
();
set_window_pos
(
fPreferencesWindow
,
frame
);
}
bool
showing
;
if
(
fSettings
->
FindBool
(
"playlist showing"
,
&
showing
)
==
B_OK
)
...
...
modules/gui/beos/PreferencesWindow.cpp
View file @
9ee5c170
...
...
@@ -2,7 +2,7 @@
* PreferencesWindow.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: PreferencesWindow.cpp,v 1.1
5 2003/05/03 13:37:21
titer Exp $
* $Id: PreferencesWindow.cpp,v 1.1
6 2003/05/05 13:06:02
titer Exp $
*
* Authors: Eric Petit <titer@videolan.org>
*
...
...
@@ -56,7 +56,7 @@ ConfigView::ConfigView( BRect frame, const char * name,
PreferencesWindow
::
PreferencesWindow
(
intf_thread_t
*
p_interface
,
BRect
frame
,
const
char
*
name
)
:
BWindow
(
frame
,
name
,
B_FLOATING_WINDOW_LOOK
,
B_NORMAL_WINDOW_FEEL
,
B_NOT_ZOOMABLE
),
B_NOT_ZOOMABLE
|
B_NOT_H_RESIZABLE
),
fConfigScroll
(
NULL
),
p_intf
(
p_interface
)
{
...
...
@@ -75,8 +75,6 @@ PreferencesWindow::PreferencesWindow( intf_thread_t * p_interface,
fOutline
=
new
BOutlineListView
(
rect
,
"preferences tree"
,
B_SINGLE_SELECTION_LIST
,
B_FOLLOW_LEFT
|
B_FOLLOW_TOP_BOTTOM
);
rect
.
right
+=
B_V_SCROLL_BAR_WIDTH
;
BScrollView
*
scrollview
=
new
BScrollView
(
"scrollview"
,
fOutline
,
B_FOLLOW_LEFT
|
B_FOLLOW_TOP_BOTTOM
,
0
,
false
,
true
);
...
...
@@ -87,7 +85,7 @@ PreferencesWindow::PreferencesWindow( intf_thread_t * p_interface,
/* Create a dummy view so we can correctly place the real config views later */
rect
.
bottom
-=
40
;
rect
.
left
=
rect
.
right
+
15
;
rect
.
left
=
rect
.
right
+
15
+
B_V_SCROLL_BAR_WIDTH
;
rect
.
right
=
Bounds
().
right
-
15
;
fDummyView
=
new
BView
(
rect
,
""
,
B_FOLLOW_ALL_SIDES
,
B_WILL_DRAW
);
fPrefsView
->
AddChild
(
fDummyView
);
...
...
@@ -165,7 +163,7 @@ PreferencesWindow::PreferencesWindow( intf_thread_t * p_interface,
sprintf
(
name
,
"s%s"
,
p_item
->
psz_name
);
textControl
=
new
BTextControl
(
rect
,
name
,
p_item
->
psz_text
,
""
,
new
BMessage
(),
B_FOLLOW_
LEFT_RIGHT
|
B_FOLLOW_TOP
);
B_FOLLOW_
NONE
);
configView
->
AddChild
(
textControl
);
break
;
...
...
@@ -179,7 +177,7 @@ PreferencesWindow::PreferencesWindow( intf_thread_t * p_interface,
sprintf
(
name
,
"i%s"
,
p_item
->
psz_name
);
textControl
=
new
BTextControl
(
rect
,
name
,
p_item
->
psz_text
,
""
,
new
BMessage
(),
B_FOLLOW_
LEFT_RIGHT
|
B_FOLLOW_TOP
);
B_FOLLOW_
NONE
);
configView
->
AddChild
(
textControl
);
break
;
...
...
@@ -193,7 +191,7 @@ PreferencesWindow::PreferencesWindow( intf_thread_t * p_interface,
sprintf
(
name
,
"f%s"
,
p_item
->
psz_name
);
textControl
=
new
BTextControl
(
rect
,
name
,
p_item
->
psz_text
,
""
,
new
BMessage
(),
B_FOLLOW_
LEFT_RIGHT
|
B_FOLLOW_TOP
);
B_FOLLOW_
NONE
);
configView
->
AddChild
(
textControl
);
break
;
...
...
@@ -206,7 +204,7 @@ PreferencesWindow::PreferencesWindow( intf_thread_t * p_interface,
memset
(
name
,
0
,
128
);
sprintf
(
name
,
"b%s"
,
p_item
->
psz_name
);
checkBox
=
new
BCheckBox
(
rect
,
name
,
p_item
->
psz_text
,
new
BMessage
(),
B_FOLLOW_
LEFT_RIGHT
|
B_FOLLOW_TOP
);
new
BMessage
(),
B_FOLLOW_
NONE
);
configView
->
AddChild
(
checkBox
);
break
;
}
...
...
@@ -307,6 +305,18 @@ void PreferencesWindow::MessageReceived( BMessage * message )
void
PreferencesWindow
::
FrameResized
(
float
width
,
float
height
)
{
BWindow
::
FrameResized
(
width
,
height
);
StringItemWithView
*
item
;
ConfigView
*
view
;
for
(
int
i
=
0
;
i
<
fOutline
->
CountItems
();
i
++
)
{
/* Fix ConfigView sizes */
item
=
(
StringItemWithView
*
)
fOutline
->
ItemAt
(
i
);
view
=
item
->
fConfigView
;
view
->
ResizeTo
(
fDummyView
->
Bounds
().
Width
()
-
B_V_SCROLL_BAR_WIDTH
,
fDummyView
->
Bounds
().
Height
()
);
}
UpdateScrollBar
();
}
...
...
@@ -352,17 +362,24 @@ void PreferencesWindow::UpdateScrollBar()
correctly simple BViews */
/* Get the current config view */
ConfigView
*
view
;
if
(
fOutline
->
CurrentSelection
()
<
0
)
return
;
StringItemWithView
*
selectedItem
=
(
StringItemWithView
*
)
fOutline
->
ItemAt
(
fOutline
->
CurrentSelection
()
);
view
=
selectedItem
->
fConfigView
;
/* Get the available BRect for display */
BRect
display
=
fConfigScroll
->
Bounds
();
display
.
right
-=
B_V_SCROLL_BAR_WIDTH
;
/* Fix the scrollbar */
BRect
visible
=
fConfigScroll
->
Bounds
()
&
selectedItem
->
fConfigView
->
fRealBounds
;
BRect
total
=
fConfigScroll
->
Bounds
()
|
selectedItem
->
fConfigView
->
fRealBounds
;
BScrollBar
*
scrollBar
=
fConfigScroll
->
ScrollBar
(
B_VERTICAL
);
long
max
=
(
long
)(
selectedItem
->
fConfigView
->
fRealBounds
.
Height
()
-
fConfigScroll
->
Bounds
().
Height
()
);
BScrollBar
*
scrollBar
;
long
max
;
BRect
visible
=
display
&
view
->
fRealBounds
;
BRect
total
=
display
|
view
->
fRealBounds
;
scrollBar
=
fConfigScroll
->
ScrollBar
(
B_VERTICAL
);
max
=
(
long
)(
view
->
fRealBounds
.
Height
()
-
visible
.
Height
()
);
if
(
max
<
0
)
max
=
0
;
scrollBar
->
SetRange
(
0
,
max
);
scrollBar
->
SetProportion
(
visible
.
Height
()
/
total
.
Height
()
);
...
...
modules/gui/beos/PreferencesWindow.h
View file @
9ee5c170
...
...
@@ -2,7 +2,7 @@
* PreferencesWindow.h
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: PreferencesWindow.h,v 1.1
0 2003/05/03 13:37:21
titer Exp $
* $Id: PreferencesWindow.h,v 1.1
1 2003/05/05 13:06:02
titer Exp $
*
* Authors: Eric Petit <titer@videolan.org>
*
...
...
@@ -27,7 +27,7 @@
#include <Window.h>
#define PREFS_WINDOW_WIDTH 600
#define PREFS_WINDOW_HEIGHT
3
00
#define PREFS_WINDOW_HEIGHT
4
00
#define PREFS_ITEM_SELECTED 'pris'
#define PREFS_OK 'prok'
#define PREFS_REVERT 'prre'
...
...
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