Skip to content

New flash creation dialog in QML #262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 4, 2022

Conversation

Vogtinator
Copy link
Member

New flash creation dialog + an Android usability improvement + QML fixes.

With this, the warnings on exit are finally gone!

Android Linux (Plasma Wayland)
Screenshot_20220417_202742

@adriweb Please test whether the dialog works as expected on macOS and especially iOS as well.

@adriweb
Copy link
Member

adriweb commented Apr 17, 2022

on macOS, I guess it's OK? (ignore the type discrepancy, I just chose the first file I came across)
image

I'll try to test on iOS sometime soon.

@adriweb
Copy link
Member

adriweb commented Apr 17, 2022

That said, the two list selects seem to be read-only somehow:
image

@Vogtinator
Copy link
Member Author

Do they only look read-only or are they actually read-only? Might just be a weird color scheme

@adriweb
Copy link
Member

adriweb commented Apr 18, 2022

They're actually read only.
Is there any condition that makes them this way?

@Vogtinator
Copy link
Member Author

No, that makes no sense... https://doc.qt.io/qt-5/qml-qtquick-controls-combobox.html doesn't even have an enabled property!

Do other comboboxes in the config dialog behave similarly?

@adriweb
Copy link
Member

adriweb commented Apr 18, 2022

Do other comboboxes in the config dialog behave similarly?

Everything else behaves correctly

@Vogtinator
Copy link
Member Author

Can you add this in strategic places to find what disables it?

Component.onCompleted: console.log("Enabled", enabled)    
onEnabledChanged: console.log("Enabled changed", enabled)

@adriweb
Copy link
Member

adriweb commented Aug 4, 2022

Well, I tried, and it prints this:

qml: subtypeCombo Enabled true
qml: modelCombo Enabled true

Seems like a Qt bug on macOS then, who knows....

That said, even if the UI is messed up, tabbing to the control to get its focus, then pressing the arrow keys to select the wanted option, works fine (as long as you don't open the dropdown)

@adriweb
Copy link
Member

adriweb commented Aug 4, 2022

@Vogtinator
Copy link
Member Author

OK it is a Qt Bug, but not fixed in OSS releases ... https://bugreports.qt.io/browse/QTBUG-89607 / https://forum.qt.io/topic/123101/quick-controls-1-combobox-items-unselectable-on-macos/9

According to that, the issue is fixed in 5.15.3. Can you try the latest 5.15.5?

@adriweb
Copy link
Member

adriweb commented Aug 4, 2022

According to that, the issue is fixed in 5.15.3. Can you try the latest 5.15.5?

Well 5.15.5 doesn't seem to be available - it stops at 5.15.2 here... 🤔

@Vogtinator
Copy link
Member Author

According to that, the issue is fixed in 5.15.3. Can you try the latest 5.15.5?

Well 5.15.5 doesn't seem to be available - it stops at 5.15.2 here... thinking

Maybe they just do (pathetic) delayed source releleases but no binary ones? Annoying...

@adriweb
Copy link
Member

adriweb commented Aug 4, 2022

Might be time to upgrade to Qt6 :P

@Vogtinator
Copy link
Member Author

I added a workaround for the Qt bug, can you try whether that works?

@adriweb
Copy link
Member

adriweb commented Oct 20, 2022

Some usual Qt weirdness regarding text alignment and focus oddities, but it does work :)

image

Copy link
Member

@adriweb adriweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UI now works fine for me

@Vogtinator
Copy link
Member Author

Were you able to test on iOS as well?

@adriweb
Copy link
Member

adriweb commented Oct 20, 2022

Ah, no, not yet anyway, just macOS for now.

A rewritten and slightly redesigned flash creation dialog in QML.
This doesn't depend on QWidgets and can thus be used on Android/iOS as well.

Some functions to read metadata from flash components were added to the core,
they work in a less hacky way than the ones in flashdialog.cpp previously.

Fixes nspire-emus#135
Those are smaller and thus fit better on screen size constrained mobile
platforms and work fine on desktop as well.

Also allows to create snapshot files that way.
It works just fine and tells whether the permission expired. This also means it
needs to be reevaluated after reselecting files.
Declare some widths/heights correctly, fix some resizing issues.
It's a global singleton type, doesn't make sense to let QML manage it.
Before this change, it was destroyed too early, causing warnings on exit like:

TypeError: Cannot read property 'myData' of null
For some reason the bottom anchor of the scaled Keypad doesn't work anymore.
@adriweb
Copy link
Member

adriweb commented Nov 4, 2022

tested OK on iOS

@Vogtinator Vogtinator merged commit 2401656 into nspire-emus:master Nov 4, 2022
@Vogtinator Vogtinator deleted the flashdialog branch November 4, 2022 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants