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
c7703cb9
Commit
c7703cb9
authored
Apr 15, 2004
by
Stephan Assmus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed the incorrect window size limits for the interface window
parent
b64fc3c1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
modules/gui/beos/InterfaceWindow.cpp
modules/gui/beos/InterfaceWindow.cpp
+7
-3
modules/gui/beos/MediaControlView.cpp
modules/gui/beos/MediaControlView.cpp
+13
-3
No files found.
modules/gui/beos/InterfaceWindow.cpp
View file @
c7703cb9
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* Samuel Hocevar <sam@zoy.org>
* Samuel Hocevar <sam@zoy.org>
* Tony Castley <tony@castley.net>
* Tony Castley <tony@castley.net>
* Richard Shepherd <richard@rshepherd.demon.co.uk>
* Richard Shepherd <richard@rshepherd.demon.co.uk>
* Stephan Aßmus <s
tippi@yellowbites.com
>
* Stephan Aßmus <s
uperstippi@gmx.de
>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -156,7 +156,7 @@ collect_folder_contents( BDirectory& dir, BList& list, bool& deep, bool& asked,
...
@@ -156,7 +156,7 @@ collect_folder_contents( BDirectory& dir, BList& list, bool& deep, bool& asked,
// ask user if we should parse sub-folders as well
// ask user if we should parse sub-folders as well
BAlert
*
alert
=
new
BAlert
(
"sub-folders?"
,
BAlert
*
alert
=
new
BAlert
(
"sub-folders?"
,
_
(
"Open files from all sub-folders as well?"
),
_
(
"Open files from all sub-folders as well?"
),
_
(
"
No"
),
_
(
"Yes
"
),
NULL
,
B_WIDTH_AS_USUAL
,
_
(
"
Cancel"
),
_
(
"Open
"
),
NULL
,
B_WIDTH_AS_USUAL
,
B_IDEA_ALERT
);
B_IDEA_ALERT
);
int32
buttonIndex
=
alert
->
Go
();
int32
buttonIndex
=
alert
->
Go
();
deep
=
buttonIndex
==
1
;
deep
=
buttonIndex
==
1
;
...
@@ -232,7 +232,6 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char* name,
...
@@ -232,7 +232,6 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char* name,
p_mediaControl
->
MoveTo
(
fMenuBar
->
Bounds
().
LeftBottom
()
+
BPoint
(
0.0
,
1.0
)
);
p_mediaControl
->
MoveTo
(
fMenuBar
->
Bounds
().
LeftBottom
()
+
BPoint
(
0.0
,
1.0
)
);
AddChild
(
fMenuBar
);
AddChild
(
fMenuBar
);
AddChild
(
p_mediaControl
);
// Add the file Menu
// Add the file Menu
BMenu
*
fileMenu
=
new
BMenu
(
_
(
"File"
)
);
BMenu
*
fileMenu
=
new
BMenu
(
_
(
"File"
)
);
...
@@ -309,6 +308,11 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char* name,
...
@@ -309,6 +308,11 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char* name,
new
BMessage
(
OPEN_PREFERENCES
),
'S'
)
);
new
BMessage
(
OPEN_PREFERENCES
),
'S'
)
);
fMenuBar
->
AddItem
(
fShowMenu
);
fMenuBar
->
AddItem
(
fShowMenu
);
// add the media control view after the menubar is complete
// because it will set the window size limits in AttachedToWindow()
// and the menubar needs to report the correct PreferredSize()
AddChild
(
p_mediaControl
);
/* Prepare fow showing */
/* Prepare fow showing */
_SetMenusEnabled
(
false
);
_SetMenusEnabled
(
false
);
p_mediaControl
->
SetEnabled
(
false
);
p_mediaControl
->
SetEnabled
(
false
);
...
...
modules/gui/beos/MediaControlView.cpp
View file @
c7703cb9
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* MediaControlView.cpp: beos interface
* MediaControlView.cpp: beos interface
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id
: MediaControlView.cpp,v 1.21 2003/12/28 01:49:12 titer Exp
$
* $Id$
*
*
* Authors: Tony Castley <tony@castley.net>
* Authors: Tony Castley <tony@castley.net>
* Stephan Aßmus <stippi@yellowbites.com>
* Stephan Aßmus <stippi@yellowbites.com>
...
@@ -203,8 +203,18 @@ MediaControlView::AttachedToWindow()
...
@@ -203,8 +203,18 @@ MediaControlView::AttachedToWindow()
fVolumeSlider
->
SetTarget
(
Window
());
fVolumeSlider
->
SetTarget
(
Window
());
BRect
r
(
_MinFrame
());
BRect
r
(
_MinFrame
());
if
(
BMenuBar
*
menuBar
=
Window
()
->
KeyMenuBar
())
if
(
BMenuBar
*
menuBar
=
Window
()
->
KeyMenuBar
())
{
r
.
bottom
+=
menuBar
->
Bounds
().
Height
();
float
width
,
height
;
menuBar
->
GetPreferredSize
(
&
width
,
&
height
);
// r.bottom += menuBar->Bounds().Height();
r
.
bottom
+=
height
;
// see that our calculated minimal width is not smaller than what
// the menubar can be
printf
(
"preferred: width: %f, height: %f - width: %f
\n
"
,
width
,
height
,
r
.
Width
());
width
-=
r
.
Width
();
if
(
width
>
0.0
)
r
.
right
+=
width
;
}
Window
()
->
SetSizeLimits
(
r
.
Width
(),
r
.
Width
()
*
1.8
,
r
.
Height
(),
r
.
Height
()
*
1.3
);
Window
()
->
SetSizeLimits
(
r
.
Width
(),
r
.
Width
()
*
1.8
,
r
.
Height
(),
r
.
Height
()
*
1.3
);
if
(
!
Window
()
->
Bounds
().
Contains
(
r
))
if
(
!
Window
()
->
Bounds
().
Contains
(
r
))
...
...
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