mirror of https://github.com/buggins/dlangide.git
home screen
This commit is contained in:
parent
01ffc1dffa
commit
42b1a1bea2
|
@ -277,6 +277,9 @@ class IDEFrame : AppFrame {
|
||||||
wnd.mainWidget = createAboutWidget();
|
wnd.mainWidget = createAboutWidget();
|
||||||
wnd.show();
|
wnd.show();
|
||||||
return true;
|
return true;
|
||||||
|
case StandardAction.OpenUrl:
|
||||||
|
platform.openURL(a.stringParam);
|
||||||
|
return true;
|
||||||
case IDEActions.FileOpen:
|
case IDEActions.FileOpen:
|
||||||
UIString caption;
|
UIString caption;
|
||||||
caption = "Open Text File"d;
|
caption = "Open Text File"d;
|
||||||
|
|
|
@ -10,6 +10,8 @@ import dlangide.ui.commands;
|
||||||
class HomeScreen : ScrollWidget {
|
class HomeScreen : ScrollWidget {
|
||||||
protected IDEFrame _frame;
|
protected IDEFrame _frame;
|
||||||
protected HorizontalLayout _content;
|
protected HorizontalLayout _content;
|
||||||
|
protected VerticalLayout _startItems;
|
||||||
|
protected VerticalLayout _recentItems;
|
||||||
this(string ID, IDEFrame frame) {
|
this(string ID, IDEFrame frame) {
|
||||||
super(ID);
|
super(ID);
|
||||||
backgroundColor = 0xFFFFFF;
|
backgroundColor = 0xFFFFFF;
|
||||||
|
@ -23,17 +25,26 @@ class HomeScreen : ScrollWidget {
|
||||||
_content.addChild(_column1);
|
_content.addChild(_column1);
|
||||||
_content.addChild(_column2);
|
_content.addChild(_column2);
|
||||||
_column1.addChild((new TextWidget(null, "Dlang IDE"d)).fontSize(32).textColor(0x000080));
|
_column1.addChild((new TextWidget(null, "Dlang IDE"d)).fontSize(32).textColor(0x000080));
|
||||||
_column1.addChild((new TextWidget(null, "D language IDE written in D"d)).fontSize(24));
|
_column1.addChild((new TextWidget(null, "D language IDE written in D"d)).fontSize(20));
|
||||||
_column1.addChild((new TextWidget(null, "(c) Vadim Lopatin 2015"d)).fontSize(24).textColor(0x000080));
|
_column1.addChild((new TextWidget(null, "(c) Vadim Lopatin 2015"d)).fontSize(22).textColor(0x000080));
|
||||||
_column1.addChild(new VSpacer());
|
_column1.addChild(new VSpacer());
|
||||||
_column1.addChild(new TextWidget(null, "Start:"d));
|
_column1.addChild((new TextWidget(null, "Start with:"d)).fontSize(20).textColor(0x000040));
|
||||||
_column1.addChild(new ImageTextButton(ACTION_FILE_NEW_WORKSPACE));
|
_startItems = new VerticalLayout();
|
||||||
_column1.addChild(new ImageTextButton(ACTION_FILE_NEW_PROJECT));
|
_recentItems = new VerticalLayout();
|
||||||
_column1.addChild(new ImageTextButton(ACTION_FILE_OPEN_WORKSPACE));
|
_startItems.addChild(new ImageTextButton(ACTION_FILE_OPEN_WORKSPACE));
|
||||||
|
_startItems.addChild(new ImageTextButton(ACTION_FILE_NEW_WORKSPACE));
|
||||||
|
_startItems.addChild(new ImageTextButton(ACTION_FILE_NEW_PROJECT));
|
||||||
|
_column1.addChild(_startItems);
|
||||||
_column1.addChild(new VSpacer());
|
_column1.addChild(new VSpacer());
|
||||||
_column1.addChild(new TextWidget(null, "Recent:"d));
|
_column1.addChild((new TextWidget(null, "Recent:"d)).fontSize(20).textColor(0x000040));
|
||||||
|
_recentItems.addChild((new TextWidget(null, "No recent items"d)));
|
||||||
|
_column1.addChild(_recentItems);
|
||||||
_column1.addChild(new VSpacer());
|
_column1.addChild(new VSpacer());
|
||||||
_column2.addChild(new TextWidget(null, "Useful links:"d));
|
_column2.addChild((new TextWidget(null, "Useful Links:"d)).fontSize(20).textColor(0x000040));
|
||||||
|
_column2.addChild(new UrlImageTextButton(null, "D Programming Language"d, "http://dlang.org/"));
|
||||||
|
_column2.addChild(new UrlImageTextButton(null, "DUB repository"d, "http://code.dlang.org/"));
|
||||||
|
_column2.addChild(new UrlImageTextButton(null, "DLangUI on GitHub"d, "https://github.com/buggins/dlangui"));
|
||||||
|
_column2.addChild(new UrlImageTextButton(null, "DLangIDE on GitHub"d, "https://github.com/buggins/dlangide"));
|
||||||
_column2.addChild(new VSpacer());
|
_column2.addChild(new VSpacer());
|
||||||
contentWidget = _content;
|
contentWidget = _content;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
EXIT=Exit
|
EXIT=Exit
|
||||||
MENU_FILE=&FILE
|
MENU_FILE=&FILE
|
||||||
MENU_FILE_NEW=&New
|
MENU_FILE_NEW=&New
|
||||||
MENU_FILE_NEW_SOURCE_FILE=New source file
|
MENU_FILE_NEW_SOURCE_FILE=New Source File
|
||||||
MENU_FILE_NEW_PROJECT=New project
|
MENU_FILE_NEW_PROJECT=New Project
|
||||||
MENU_FILE_NEW_WORKSPACE=New workspace
|
MENU_FILE_NEW_WORKSPACE=New Workspace
|
||||||
MENU_FILE_OPEN=&Open file
|
MENU_FILE_OPEN=&Open file...
|
||||||
MENU_FILE_OPEN_WORKSPACE=Open project or workspace
|
MENU_FILE_OPEN_WORKSPACE=Open Project or Workspace...
|
||||||
MENU_FILE_OPEN_RECENT=Open recent
|
MENU_FILE_OPEN_RECENT=Open recent
|
||||||
MENU_FILE_SAVE=&Save file
|
MENU_FILE_SAVE=&Save file
|
||||||
MENU_FILE_SAVE_AS=&Save file as...
|
MENU_FILE_SAVE_AS=&Save file as...
|
||||||
|
|
Loading…
Reference in New Issue