Skip to content

Commit 8598087

Browse files
committed
fix: issues related sciter sdk v5.0.3.0
1 parent 24bf1ab commit 8598087

9 files changed

+29
-18
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.exe
2+
*.dll
23
.vs
34
main/resources.cpp
45
*.aps

sdk

Submodule sdk updated from b87f720 to 6f18e87

src/components/browse-storage.css

+9-7
Original file line numberDiff line numberDiff line change
@@ -91,26 +91,28 @@
9191
white-space: pre-wrap;
9292
word-break: break-all;
9393
}
94-
95-
:root > menu.popup {
94+
}
95+
@set popup-menu
96+
{
97+
:root {
9698
font-size: 10pt;
9799
}
98100

99-
:root > menu.popup > li {
101+
:root > li {
100102
foreground-size: 18dip;
101103
foreground-position: 4dip 50%;
102104
}
103105

104-
:root > menu.popup > li:hover {
105-
background: color(accent-color);
106+
:root > li:hover {
107+
//background: color(accent-color);
106108
cursor: pointer;
107109
}
108110

109-
:root > menu.popup > li#delete {
111+
:root > li#delete {
110112
foreground-image: url(../assets/delete.svg);
111113
}
112114

113-
:root > menu.popup > li#rename {
115+
:root > li#rename {
114116
foreground-image: url(../assets/rename.svg);
115117
}
116118
}

src/components/browse-storage.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class BrowseStorage extends Element
2020
["on ^click at div.context[key]"](evt, el) {
2121
const freezed = el.getAttribute("freeze") === 'true' ? true : false;
2222
this.$("menu.popup > li#delete").state.disabled = freezed;
23-
this.popup = el.popup(this.$("menu.popup"));
23+
this.popup = el.popup(this.$("menu.popup"), {anchorAt: 5, popupAt: 7});
2424
return true;
2525
}
2626

@@ -102,7 +102,7 @@ export class BrowseStorage extends Element
102102
{tape.id === this.renaming ? <input index={index}>{tape.name}</input> : <div.name>{tape.name}</div>}
103103
</div>
104104
})}
105-
<menu.popup>
105+
<menu.popup styleset={__DIR__ + "browse-storage.css#popup-menu"}>
106106
<li #rename>Rename</li>
107107
<li #delete>Delete</li>
108108
</menu>

src/components/editor.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
}
4040

4141
:root > text {
42-
white-space:pre;
42+
white-space: pre-wrap;
4343
height:1.4em;
4444
line-height:1.4em;
4545
}

src/components/editor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ export class Editor extends Element {
341341
);
342342
if(!toolTipToken) return;
343343
const tooltip = <popup.tooltip>{toolTipToken.tooltip}</popup>;
344-
const position = {x: evt.windowX, y: evt.windowY };
344+
const position = {popupAt: 7, x: evt.windowX, y: evt.windowY};
345345
this.shownPopup = this.popup(tooltip, position);
346346

347347
return true;

src/components/settings.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
:root {
44
padding: 12dip;
5-
size: 25% *;
5+
size: *;
66
background: #eee;
77
}
88

src/main.css

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616
flow: horizontal;
1717
}
1818

19+
:root > section.sidepanel.files {
20+
width: 220dip;
21+
}
1922
:root > section.sidepanel {
20-
size: 220dip;
23+
width: 0.30*;
2124
height: *;
2225
background: #eee;
2326
//flow: stack;

src/main.htm

+9-4
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
}
178178

179179
["on browse-tapes"](evt, el) {
180-
this.componentUpdate({browse: !this.browse});
180+
this.componentUpdate({browse: !this.browse, showSettings: false});
181181
}
182182

183183
["on settings-changed"](evt, form){
@@ -206,7 +206,7 @@
206206
}
207207

208208
["on click at :root section.editor > div.controls > #settings"](evt, el){
209-
this.componentUpdate({showSettings: true});
209+
this.componentUpdate({showSettings: true, browse: false});
210210
}
211211

212212
["on settings-close"](evt, el){
@@ -258,7 +258,7 @@
258258
return <body styleset={__DIR__+"main.css#main"}>
259259
{
260260
this.browse &&
261-
<section.sidepanel>
261+
<section.sidepanel.files>
262262
<BrowseStorage current={this.currentTape.id} list={Storage.all()}/>
263263
</section>
264264
}
@@ -269,7 +269,12 @@
269269
{ hasPdf() && <button #pdf/> }
270270
</div>
271271
</section>
272-
{ this.showSettings && <SettingsForm formData={this.settings}/> }
272+
{
273+
this.showSettings &&
274+
<section.sidepanel>
275+
<SettingsForm formData={this.settings}/>
276+
</section>
277+
}
273278
</body>;
274279
}
275280
}

0 commit comments

Comments
 (0)