0.1.4
This commit is contained in:
+26
-6
@@ -294,7 +294,8 @@ component EndianChip inherits Rectangle {
|
||||
}
|
||||
|
||||
export component AppWindow inherits Window {
|
||||
title: "rcalc";
|
||||
in-out property <string> app-title: "Rcalc";
|
||||
title: root.app-title;
|
||||
icon: @image-url("../assets/icon-256.png");
|
||||
preferred-width: 420px;
|
||||
preferred-height: 640px;
|
||||
@@ -308,6 +309,8 @@ export component AppWindow inherits Window {
|
||||
in property <string> display-text: "0";
|
||||
in property <string> expression-text: "";
|
||||
in property <bool> has-memory: false;
|
||||
// 0 = classic standard, 1 = formula
|
||||
in property <int> std-panel: 0;
|
||||
|
||||
in property <string> hex-text: "0";
|
||||
in property <string> dec-text: "0";
|
||||
@@ -1004,6 +1007,21 @@ export component AppWindow inherits Window {
|
||||
}
|
||||
}
|
||||
|
||||
if root.mode == 0: HorizontalLayout {
|
||||
spacing: 6px;
|
||||
height: 30px;
|
||||
ModeTab {
|
||||
label: "Ordinary";
|
||||
active: root.std-panel == 0;
|
||||
clicked => { root.press("panel:std"); }
|
||||
}
|
||||
ModeTab {
|
||||
label: "Formula";
|
||||
active: root.std-panel == 1;
|
||||
clicked => { root.press("panel:formula"); }
|
||||
}
|
||||
}
|
||||
|
||||
if root.mode == 0: HorizontalLayout {
|
||||
spacing: 6px;
|
||||
height: 32px;
|
||||
@@ -1017,15 +1035,17 @@ export component AppWindow inherits Window {
|
||||
if root.mode == 0: GridLayout {
|
||||
spacing: 6px;
|
||||
Row {
|
||||
FuncBtn { label: "%"; clicked => { root.press("%"); } }
|
||||
FuncBtn { label: "CE"; clicked => { root.press("CE"); } }
|
||||
if root.std-panel == 0: FuncBtn { label: "%"; clicked => { root.press("%"); } }
|
||||
if root.std-panel == 1: FuncBtn { label: "("; clicked => { root.press("("); } }
|
||||
if root.std-panel == 0: FuncBtn { label: "CE"; clicked => { root.press("CE"); } }
|
||||
if root.std-panel == 1: FuncBtn { label: ")"; clicked => { root.press(")"); } }
|
||||
FuncBtn { label: "C"; clicked => { root.press("C"); } }
|
||||
FuncBtn { label: "⌫"; clicked => { root.press("BS"); } }
|
||||
}
|
||||
Row {
|
||||
FuncBtn { label: "1/x"; clicked => { root.press("1/x"); } }
|
||||
FuncBtn { label: "x²"; clicked => { root.press("x2"); } }
|
||||
FuncBtn { label: "√x"; clicked => { root.press("sqrt"); } }
|
||||
FuncBtn { label: "1/x"; enabled: root.std-panel == 0; clicked => { root.press("1/x"); } }
|
||||
FuncBtn { label: "x²"; enabled: root.std-panel == 0; clicked => { root.press("x2"); } }
|
||||
FuncBtn { label: "√x"; enabled: root.std-panel == 0; clicked => { root.press("sqrt"); } }
|
||||
FuncBtn { label: "÷"; clicked => { root.press("/"); } }
|
||||
}
|
||||
Row {
|
||||
|
||||
Reference in New Issue
Block a user