StyledEdit: fix layout
Fixes #16721. Change-Id: I1ab1489b5cfe6ae0fce4ba1de9d14c69685e5a65 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3603 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
@@ -85,7 +85,8 @@ bs_printf(BString* string, const char* format, ...)
|
|||||||
|
|
||||||
StyledEditWindow::StyledEditWindow(BRect frame, int32 id, uint32 encoding)
|
StyledEditWindow::StyledEditWindow(BRect frame, int32 id, uint32 encoding)
|
||||||
:
|
:
|
||||||
BWindow(frame, "untitled", B_DOCUMENT_WINDOW, B_ASYNCHRONOUS_CONTROLS),
|
BWindow(frame, "untitled", B_DOCUMENT_WINDOW, B_ASYNCHRONOUS_CONTROLS
|
||||||
|
| B_AUTO_UPDATE_SIZE_LIMITS),
|
||||||
fFindWindow(NULL),
|
fFindWindow(NULL),
|
||||||
fReplaceWindow(NULL)
|
fReplaceWindow(NULL)
|
||||||
{
|
{
|
||||||
@@ -101,7 +102,8 @@ StyledEditWindow::StyledEditWindow(BRect frame, int32 id, uint32 encoding)
|
|||||||
|
|
||||||
StyledEditWindow::StyledEditWindow(BRect frame, entry_ref* ref, uint32 encoding)
|
StyledEditWindow::StyledEditWindow(BRect frame, entry_ref* ref, uint32 encoding)
|
||||||
:
|
:
|
||||||
BWindow(frame, "untitled", B_DOCUMENT_WINDOW, B_ASYNCHRONOUS_CONTROLS),
|
BWindow(frame, "untitled", B_DOCUMENT_WINDOW, B_ASYNCHRONOUS_CONTROLS
|
||||||
|
| B_AUTO_UPDATE_SIZE_LIMITS),
|
||||||
fFindWindow(NULL),
|
fFindWindow(NULL),
|
||||||
fReplaceWindow(NULL)
|
fReplaceWindow(NULL)
|
||||||
{
|
{
|
||||||
@@ -1324,11 +1326,14 @@ StyledEditWindow::_InitWindow(uint32 encoding)
|
|||||||
fSavePanel = NULL;
|
fSavePanel = NULL;
|
||||||
fSavePanelEncodingMenu = NULL;
|
fSavePanelEncodingMenu = NULL;
|
||||||
|
|
||||||
BGroupLayout* layout = new BGroupLayout(B_VERTICAL, 0);
|
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
|
||||||
SetLayout(layout);
|
.Add(mainMenu)
|
||||||
layout->AddView(mainMenu);
|
.AddGroup(B_VERTICAL, 0)
|
||||||
layout->AddView(fScrollView);
|
.SetInsets(-1)
|
||||||
layout->SetInsets(0, 0, -1, -1);
|
.Add(fScrollView)
|
||||||
|
.End()
|
||||||
|
.End();
|
||||||
|
|
||||||
SetKeyMenuBar(mainMenu);
|
SetKeyMenuBar(mainMenu);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user