* Fix use of FindData(), now we can find colors and fonts!
* Implemented a text input box to name a new theme. * Made loading of themes asynchronous in a thread, controls are disabled but at least the window appears ASAP. * fixed app sig * Implemented setting colors and fonts on Haiku. * Implemented setting the window decor, but doesn't work as we don't have any decorator installed. * Enable all addons. TODO: forbid quitting while themes are loading! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23508 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+25
@@ -1,5 +1,12 @@
|
||||
//HACK :P
|
||||
#define private public
|
||||
#include <Alert.h>
|
||||
#undef private
|
||||
|
||||
#include "TextInputAlert.h"
|
||||
|
||||
#define TEXT_HEIGHT 25
|
||||
|
||||
|
||||
TextInputAlert::TextInputAlert(const char *title,
|
||||
const char *text,
|
||||
@@ -11,6 +18,17 @@ TextInputAlert::TextInputAlert(const char *title,
|
||||
alert_type type)
|
||||
: BAlert(title, text, button0Label, button1Label, button2Label, widthStyle, type)
|
||||
{
|
||||
ResizeBy(0,TEXT_HEIGHT);
|
||||
BRect f = Bounds();
|
||||
f.InsetBySelf(TEXT_HEIGHT, f.Height()/4 - TEXT_HEIGHT/2);
|
||||
f.left *= 3;
|
||||
fText = new BTextControl(f, "text", "Name:", initial, NULL);
|
||||
fText->SetDivider(f.Width()/3);
|
||||
ChildAt(0)->AddChild(fText);
|
||||
TextView()->Hide();
|
||||
fText->SetViewColor(ChildAt(0)->ViewColor());
|
||||
fText->SetLowColor(ChildAt(0)->LowColor());
|
||||
fText->TextView()->SelectAll();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,3 +37,10 @@ TextInputAlert::~TextInputAlert()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TextInputAlert::Show()
|
||||
{
|
||||
BAlert::Show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user