Skip to content

Commit 2e58092

Browse files
authored
Merge pull request #251 from chrisws/12_29
12 30
2 parents 3bc3264 + 04ed12c commit 2e58092

File tree

20 files changed

+2300
-826
lines changed

20 files changed

+2300
-826
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ function(checkDebugMode)
4141
set(SANITIZER_FLAGS "-fstack-protector-all -fno-omit-frame-pointer -fsanitize=address,undefined")
4242
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SANITIZER_FLAGS}")
4343
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SANITIZER_FLAGS}")
44+
set(_DEBUG)
4445
message(STATUS "Debug mode enabled via --with-debug")
4546
endif()
4647
endfunction()

ide/config.h.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is part of SmallBASIC
22
//
3-
// SmallBASIC module header
3+
// SmallBASIC module header used with CMake
44
//
55
// This program is distributed under the terms of the GPL v2.0 or later
66
// Download the GNU Public License (GPL) from www.gnu.org
@@ -18,7 +18,8 @@ extern "C" {
1818
#cmakedefine01 _UnixOS
1919
#cmakedefine01 IMPL_DEV_READ
2020
#cmakedefine01 IMPL_LOG_WRITE
21-
#cmakedefine _SDL_VERSION "@_SDL_VERSION@"
21+
#cmakedefine01 _DEBUG
22+
#cmakedefine _SDL_VERSION "@_SDL_VERSION@ "
2223
#cmakedefine VERSION "@VERSION@"
2324
#cmakedefine BUILD_DATE @BUILD_DATE@
2425
#cmakedefine SB_DWORD_VER @SB_DWORD_VER@

keypad/build.sh

Lines changed: 8 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"\
@@ -11,6 +13,8 @@ declare -a IMAGE_FILES=(\
1113
"arrow-enter"\
1214
"search"\
1315
"layers"\
16+
"arrow-left"\
17+
"arrow-right"\
1418
"arrow-down"\
1519
"arrow-download"\
1620
"arrow-up" \
@@ -22,14 +26,16 @@ echo "#pragma once" > keypad_icons.h
2226
echo "// https://procode-software.github.io/proicons/icons" >> keypad_icons.h
2327
for imageFile in "${IMAGE_FILES[@]}"
2428
do
29+
echo $imageFile
2530
curl -sLO https://raw.githubusercontent.com/ProCode-Software/proicons/refs/heads/main/icons/svg/${imageFile}.svg
2631

2732
# set width, height, and fill
28-
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
2934
sed -i 's/currentColor/#ffffff/g' ${imageFile}.svg
3035

3136
# convert svg to png using ImageMagick
32-
convert -background none ${imageFile}.svg ${imageFile}.png
37+
# convert -background none ${imageFile}.svg ${imageFile}.png
38+
rsvg-convert -o ${imageFile}.png ${imageFile}.svg
3339

3440
# convert png to byte array
3541
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/app/src/main/java/net/sourceforge/smallbasic/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ public int getWindowHeight() {
430430
}
431431

432432
public boolean isPredictiveBack() {
433-
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU;
433+
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.BAKLAVA;
434434
}
435435

436436
public boolean loadModules() {

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/jni/editor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ void Runtime::editSource(strlib::String loadPath, bool restoreOnExit) {
156156
if (_keypad != nullptr) {
157157
_output->addInput(_keypad);
158158
} else {
159-
_keypad = new KeypadInput(false, false, charWidth, charHeight);
159+
_keypad = new KeypadInput(w, false, false, charWidth, charHeight);
160160
_output->addInput(_keypad);
161161
}
162162

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<link rel="icon" type="image/png" href="sb-desktop-32x32.png">
7+
<title>SmallBASIC</title>
8+
<link rel="stylesheet" type="text/css" href="./main.css"/>
9+
<script type="module" crossorigin src="./main.js"></script>
10+
</head>
11+
<body>
12+
<noscript>You need to enable JavaScript to run this app.</noscript>
13+
<div class="app-bar">
14+
<h1>SmallBASIC</h1>
15+
<a href="https://smallbasic.github.io" target="_blank">smallbasic.github.io</a>
16+
</div>
17+
<div class="main-content" id="main-content"></div>
18+
<input type="file" id="file-upload" multiple class="hidden">
19+
</body>
20+
</html>
Lines changed: 277 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,277 @@
1+
* {
2+
margin: 0;
3+
padding: 0;
4+
box-sizing: border-box;
5+
}
6+
7+
body {
8+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
9+
background: #f5f5f5;
10+
height: 100vh;
11+
}
12+
13+
.app-bar {
14+
background: #1976d2;
15+
color: white;
16+
padding: 1rem;
17+
display: flex;
18+
justify-content: space-between;
19+
align-items: center;
20+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
21+
}
22+
23+
.app-bar h1 {
24+
font-size: 1.25rem;
25+
font-weight: 500;
26+
}
27+
28+
.app-bar a {
29+
color: white;
30+
text-decoration: none;
31+
font-size: 1.25rem;
32+
}
33+
34+
.app-bar a:hover {
35+
text-decoration: underline;
36+
}
37+
38+
.main-content {
39+
height: calc(100vh - 88px);
40+
width: 100%;
41+
overflow: auto;
42+
}
43+
44+
.login-container {
45+
display: flex;
46+
justify-content: center;
47+
align-items: center;
48+
height: 100%;
49+
}
50+
51+
.login-form {
52+
background: white;
53+
padding: 2rem;
54+
border-radius: 8px;
55+
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
56+
min-width: 320px;
57+
}
58+
59+
.form-group {
60+
margin-bottom: 1rem;
61+
}
62+
63+
.form-group label {
64+
display: block;
65+
margin-bottom: 0.5rem;
66+
font-weight: 500;
67+
}
68+
69+
.form-group input {
70+
width: 100%;
71+
padding: 0.75rem;
72+
border: 1px solid #ddd;
73+
border-radius: 4px;
74+
font-size: 1rem;
75+
}
76+
77+
.form-group input:focus {
78+
outline: none;
79+
border-color: #1976d2;
80+
box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
81+
}
82+
83+
.form-group input.error {
84+
border-color: #d32f2f;
85+
}
86+
87+
.helper-text {
88+
font-size: 0.875rem;
89+
color: #666;
90+
margin-top: 0.25rem;
91+
}
92+
93+
.helper-text.error {
94+
color: #d32f2f;
95+
}
96+
97+
.btn {
98+
background: #1976d2;
99+
color: white;
100+
border: none;
101+
padding: 0.75rem 1.5rem;
102+
border-radius: 4px;
103+
cursor: pointer;
104+
font-size: 1rem;
105+
transition: background 0.2s;
106+
}
107+
108+
.btn:hover {
109+
background: #1565c0;
110+
}
111+
112+
.btn:disabled {
113+
background: #ccc;
114+
cursor: not-allowed;
115+
}
116+
117+
.btn-small {
118+
padding: 0.5rem 1rem;
119+
font-size: 0.875rem;
120+
}
121+
122+
.btn-icon {
123+
display: inline-flex;
124+
align-items: center;
125+
gap: 0.5rem;
126+
}
127+
128+
.toolbar {
129+
background: white;
130+
padding: 1rem;
131+
border-bottom: 1px solid #ddd;
132+
display: flex;
133+
gap: 1rem;
134+
flex-wrap: wrap;
135+
}
136+
137+
.table-container {
138+
background: white;
139+
margin: 0;
140+
overflow: auto;
141+
}
142+
143+
table {
144+
width: 100%;
145+
border-collapse: collapse;
146+
}
147+
148+
th, td {
149+
padding: 1rem;
150+
text-align: left;
151+
border-bottom: 1px solid #eee;
152+
}
153+
154+
th {
155+
background: #f5f5f5;
156+
font-weight: 600;
157+
position: sticky;
158+
top: 0;
159+
}
160+
161+
tr:hover {
162+
background: #f9f9f9;
163+
}
164+
165+
.selected {
166+
background: #e3f2fd !important;
167+
}
168+
169+
.editable {
170+
cursor: text;
171+
}
172+
173+
.editable:hover {
174+
background: #f0f0f0;
175+
}
176+
177+
.edit-input {
178+
width: 100%;
179+
padding: 0.25rem;
180+
border: 1px solid #1976d2;
181+
border-radius: 2px;
182+
font-size: inherit;
183+
}
184+
185+
.snackbar {
186+
position: fixed;
187+
bottom: 1rem;
188+
left: 50%;
189+
transform: translateX(-50%);
190+
background: #323232;
191+
color: white;
192+
padding: 1rem 1.5rem;
193+
border-radius: 4px;
194+
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
195+
z-index: 1000;
196+
min-width: 300px;
197+
text-align: center;
198+
}
199+
200+
.snackbar.success {
201+
background: #4caf50;
202+
}
203+
204+
.snackbar.error {
205+
background: #f44336;
206+
}
207+
208+
.dialog-overlay {
209+
position: fixed;
210+
top: 0;
211+
left: 0;
212+
right: 0;
213+
bottom: 0;
214+
background: rgba(0,0,0,0.5);
215+
display: flex;
216+
align-items: center;
217+
justify-content: center;
218+
z-index: 1000;
219+
}
220+
221+
.dialog {
222+
background: white;
223+
border-radius: 8px;
224+
padding: 1.5rem;
225+
min-width: 320px;
226+
box-shadow: 0 4px 16px rgba(0,0,0,0.2);
227+
}
228+
229+
.dialog h2 {
230+
margin-bottom: 1rem;
231+
font-size: 1.25rem;
232+
}
233+
234+
.dialog p {
235+
margin-bottom: 1.5rem;
236+
color: #666;
237+
}
238+
239+
.dialog-actions {
240+
display: flex;
241+
justify-content: flex-end;
242+
gap: 1rem;
243+
}
244+
245+
.checkbox {
246+
width: 18px;
247+
height: 18px;
248+
margin-right: 0.5rem;
249+
}
250+
251+
.hidden {
252+
display: none;
253+
}
254+
255+
.loading {
256+
display: inline-block;
257+
width: 20px;
258+
height: 20px;
259+
border: 3px solid #f3f3f3;
260+
border-top: 3px solid #1976d2;
261+
border-radius: 50%;
262+
animation: spin 1s linear infinite;
263+
}
264+
265+
@keyframes spin {
266+
0% { transform: rotate(0deg); }
267+
100% { transform: rotate(360deg); }
268+
}
269+
270+
.sort-indicator {
271+
margin-left: 0.5rem;
272+
opacity: 0.5;
273+
}
274+
275+
.sort-indicator.active {
276+
opacity: 1;
277+
}

0 commit comments

Comments
 (0)