Rename SwitchWidget to SwitchButton - close issue #235

This commit is contained in:
Vadim Lopatin 2016-05-18 15:38:17 +03:00
parent 5f6c0ddf3e
commit 7c7b5df51c
3 changed files with 7 additions and 7 deletions

View File

@ -567,11 +567,11 @@ extern (C) int UIAppMain(string[] args) {
buttons10.addChild(new TextWidget(null, "ImageTextButton widgets: "d));
buttons10.addChild(new ImageTextButton("btn5", "text-plain", "Enabled"d));
buttons10.addChild((new ImageTextButton("btn6", "folder", "Disabled"d)).enabled(false));
buttons10.addChild(new TextWidget(null, "SwitchWidget widgets: "d));
buttons10.addChild((new SwitchWidget("SW1")).checked(true));
buttons10.addChild((new SwitchWidget("SW2")).checked(false));
buttons10.addChild((new SwitchWidget("SW3")).checked(true).enabled(false));
buttons10.addChild((new SwitchWidget("SW4")).checked(false).enabled(false));
buttons10.addChild(new TextWidget(null, "SwitchButton widgets: "d));
buttons10.addChild((new SwitchButton("SW1")).checked(true));
buttons10.addChild((new SwitchButton("SW2")).checked(false));
buttons10.addChild((new SwitchButton("SW3")).checked(true).enabled(false));
buttons10.addChild((new SwitchButton("SW4")).checked(false).enabled(false));
layout3.addChild(buttons10);
WidgetGroup buttons11 = new HorizontalLayout();

View File

@ -311,7 +311,7 @@ void registerStandardWidgets() {
mixin(registerWidgets!(FileNameEditLine, DirEditLine, //dlangui.dialogs.filedlg
ComboBox, ComboEdit, //dlangui.widgets.combobox
Widget, TextWidget, MultilineTextWidget, Button, ImageWidget, ImageButton, ImageCheckButton, ImageTextButton,
SwitchWidget, RadioButton, CheckBox, ScrollBar, HSpacer, VSpacer, CanvasWidget, // dlangui.widgets.controls
SwitchButton, RadioButton, CheckBox, ScrollBar, HSpacer, VSpacer, CanvasWidget, // dlangui.widgets.controls
EditLine, EditBox, LogWidget,//dlangui.widgets.editors
StringGridWidget, //dlangui.widgets.grid
VerticalLayout, HorizontalLayout, TableLayout, FrameLayout, // dlangui.widgets.layouts

View File

@ -160,7 +160,7 @@ class MultilineTextWidget : TextWidget {
}
/// Switch (on/off) widget
class SwitchWidget : Widget {
class SwitchButton : Widget {
this(string ID = null) {
super(ID);
styleId = STYLE_SWITCH;