People: make default size larger

We have increased the number of default attributes, so the initial size
wasn't enough.

On small resolution displays, adjust the size to not end up with part
of the window outside the screen.

Fixes #15371

Change-Id: Ie59cb3a3f6609eff7d933d0bf0e11f66637d6d10
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2222
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
Adrien Destugues 2021-07-24 18:26:19 +02:00 committed by Adrien Destugues
parent 40a12ac67e
commit b5a859ad62
2 changed files with 6 additions and 2 deletions

View File

@ -29,6 +29,7 @@
#include <NodeInfo.h>
#include <NodeMonitor.h>
#include <Path.h>
#include <Screen.h>
#include <ScrollView.h>
#include <String.h>
#include <TextView.h>
@ -337,6 +338,9 @@ PersonWindow::QuitRequested()
void
PersonWindow::Show()
{
BRect screenFrame = BScreen(this).Frame();
if (Frame().bottom > screenFrame.bottom)
ResizeBy(0, screenFrame.bottom - Frame().bottom - 10);
fView->MakeFocus();
BWindow::Show();
}

View File

@ -16,9 +16,9 @@
#include <Window.h>
#define TITLE_BAR_HEIGHT 25
#define TITLE_BAR_HEIGHT 32
#define WIND_WIDTH 420
#define WIND_HEIGHT 340
#define WIND_HEIGHT 600
class PersonView;