Skip to content

Commit 8688244

Browse files
author
Chris Warren-Smith
committed
ANDROID: improve editor toolbar button display quality
- fixes a regression with select-all in the web portal
1 parent a5c4401 commit 8688244

File tree

7 files changed

+1078
-760
lines changed

7 files changed

+1078
-760
lines changed

keypad/build.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
# sudo apt install librsvg2-bin
4+
35
declare -a IMAGE_FILES=(\
46
"cut"\
57
"copy"\
@@ -24,14 +26,16 @@ echo "#pragma once" > keypad_icons.h
2426
echo "// https://procode-software.github.io/proicons/icons" >> keypad_icons.h
2527
for imageFile in "${IMAGE_FILES[@]}"
2628
do
29+
echo $imageFile
2730
curl -sLO https://raw.githubusercontent.com/ProCode-Software/proicons/refs/heads/main/icons/svg/${imageFile}.svg
2831

2932
# set width, height, and fill
30-
sed -i 's/width="24" height="24"/width="30" height="30"/' ${imageFile}.svg
33+
sed -i 's/width="24" height="24"/width="50" height="50"/' ${imageFile}.svg
3134
sed -i 's/currentColor/#ffffff/g' ${imageFile}.svg
3235

3336
# convert svg to png using ImageMagick
34-
convert -background none ${imageFile}.svg ${imageFile}.png
37+
# convert -background none ${imageFile}.svg ${imageFile}.png
38+
rsvg-convert -o ${imageFile}.png ${imageFile}.svg
3539

3640
# convert png to byte array
3741
xxd -n img_${imageFile} -i ${imageFile}.png >> keypad_icons.h

src/platform/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99
applicationId 'net.sourceforge.smallbasic'
1010
minSdkVersion 21
1111
targetSdkVersion 36
12-
versionCode 80
12+
versionCode 83
1313
versionName '12.30'
1414
resourceConfigurations += ['en']
1515
}

src/platform/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:8.12.0'
8+
classpath 'com.android.tools.build:gradle:8.12.1'
99
}
1010
}
1111

src/platform/android/webui/src/App.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,11 @@ function GridToolbarDownload(props) {
211211
args += join + "f=" + encodeURIComponent(props.rows[i].fileName);
212212
join = "&";
213213
});
214-
if (props.selections.size === props.rows.length) {
215-
args = "";
214+
if (props.selections.size === props.rows.length || props.selectAll) {
215+
args = "all=t";
216216
}
217217

218-
return !props.selections.size ? null : (
218+
return !props.selections.size && !props.selectAll ? null : (
219219
<a download={download} href={`./api/download?${args}`} style={{color: color, textDecoration: 'none'}}>
220220
<Box sx={{display: 'flex', marginTop: '1px', alignItems: 'center'}} >
221221
<DownloadIcon />
@@ -313,6 +313,7 @@ function FileList(props) {
313313

314314
const toolbarProps = {
315315
selections: selectionModel.ids,
316+
selectAll: (!selectionModel.ids.length && selectionModel.type === "exclude"),
316317
clearSelections: () => setSelectionModel(emptySelection),
317318
setRows: props.setRows,
318319
rows: props.rows

src/ui/inputs.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ FormEditInput::~FormEditInput() {
445445
int FormEditInput::getControlKey(int key) {
446446
int result = key;
447447
if (_controlMode) {
448+
char *text;
448449
switch (key) {
449450
case 'x':
450451
g_system->setClipboardText(copy(true));
@@ -455,7 +456,9 @@ int FormEditInput::getControlKey(int key) {
455456
result = -1;
456457
break;
457458
case 'v':
458-
paste(g_system->getClipboardText());
459+
text = g_system->getClipboardText();
460+
paste(text);
461+
free(text);
459462
result = -1;
460463
break;
461464
case 'h':

src/ui/keypad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
constexpr int WIDE_LAYOUT = 1100;
1919

2020
// the size of PNGs as defined in keypad/build.sh
21-
constexpr int IMAGE_SIZE = 30;
21+
constexpr int IMAGE_SIZE = 50;
2222

2323
// PI
2424
constexpr double PI = 3.14159;

src/ui/keypad_icons.h

Lines changed: 1061 additions & 751 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)