Closed bragefuglseth closed 3 weeks ago
With a pointing device, a restart button is displayed when the pointer is moved. We can make the same thing happen upon a screen click on mobile.
@heldderarbeit, would you mind testing the main branch locally on your device?
Sorry, I'm not being able to build the software on pmOS. cargo build fails at finding libadwaita-1.pc, despite /usr/lib/pkgconfig/ being in my PKG_CONFIG_PATH. And this is where my knowledge about compiling Rust on Alpine ends.
sudo apk add libadwaita-dev
ls /usr/lib/pkgconfig/ | grep libadwaita-1.pc
> libadwaita-1.pc
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
cargo build
cargo:warning=
pkg-config exited with status code 1
> PKG_CONFIG_PATH=/usr/lib/pkgconfig PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags libadwaita-1 libadwaita-1 >= 1.5
The system library `libadwaita-1` required by crate `libadwaita-sys` was not found.
The file `libadwaita-1.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
PKG_CONFIG_PATH contains the following:
- /usr/lib/pkgconfig
Have you tried building it with Flatpak?
I'm getting an error when I try to build it on my desktop. Which is weird because it builds fine on my phone.
error[E0658]: use of unstable library feature 'slice_first_last_chunk'
--> src/text_generation.rs:266:62
|
266 | let unique = if let Some(previous_words) = generated.last_chunk::<2>() {
| ^^^^^^^^^^
|
= note: see issue #111774 <https://github.com/rust-lang/rust/issues/111774> for more information
For more information about this error, try `rustc --explain E0658`.
error: could not compile `keypunch` (bin "keypunch") due to previous error
Also @heldderarbeit install libadwaita-dev
Also @heldderarbeit install
libadwaita-dev
As I've written in the first line of code output, it's already installed.
Aight well apparently I can't read.
What I've done is installed builder on pmos through flatpak, it builds the application using flatpak and it works fine for me.
Great, thanks for helping out with testing!
Sorry, I was talking about how it built fine.
Pressing near the restart button does make it appear, but perhaps it would be better if tapping anywhere on the top bar would show the close/restart button. Currently you kinda have to know where to tap
Ah, I see what’s wrong now. I thought I did make the entire window sensitive.
Try the latest commit ^^
It’s good, however the buttons stay there once you start typing. For consistency’s sake it might be better if it disappears again after a timeout or once you start typing.
However the chances someone is going to notice that are slim because they’ll only make the bar visible if they want to restart or close the app, and it doesn’t stop you from taking the test or anything so..
It should disappear when typing starts again, at least it does on desktop. Will look into it tomorrow.
Try now
Sorry, I'll have to look at it further tomorrow. There's still something weird going on, now it's back to not activating at all on the phone.
Nvm! on line 53 changing device.timestamp() > imp.cursor_hidden_timestamp.get()
to device.timestamp() >= imp.cursor_hidden_timestamp.get()
fixes the issue.
Edit: Line 53 of ui_state.rs
It should work now! Mind testing once more @ashrude?
Works perfectly
Great! Thanks again for your help.
One thing that might be improved, after you start typing the top bar with the settings disappears. On desktop that's not too bad because you can press ESC, but on the setup I described here there is no easy access to that key on the default phosh keyboard, you have only numbers and letters and special characters but no control keys. If you set the timer to 10 minutes you can't access the settings for 10 minutes, unless of course killing the app.
Originally posted by @heldderarbeit in https://github.com/bragefuglseth/keypunch/issues/15#issuecomment-2156197006