Commit graph

31 commits

Author SHA1 Message Date
Floris Bos
1b85b232fd Deal with os_list.json not specifying icon for "No filtering"
Solves warning:
"qrc:/main.qml:758:21: Unable to assign [undefined] to QUrl"
2023-10-21 11:13:38 +02:00
Tom Dewey tom.dewey@raspberrypi.com
a981b57b5f qml: Recommend the 'top' OS
We're going to take advantage of the
convention of always putting the recommended OS first in the list, and
append "(Recommended)" to it's description.

This moves the recommendation out of the JSON, and makes the
recommendation durable to filtering.
2023-10-20 14:28:30 +01:00
David Turner
9a7fc7bf3c Hide empty categories when filtering
When filtering the OS list, if all items in a category/sublist are
filtered out then don't show the category/sublist.

Also, clear the selected OS when the HW device is changed, otherwise you
can get weird effects like having an incompatible (hw, os) pair selected
or the highlighted OS moving when the items in the OS list change.
2023-10-19 13:07:42 +01:00
David Turner
8a3331f613 Improve red button focus colour
- All of our red buttons were ImButton with the colours overridden at the
  use site.  Instead make an ImButtonRed which defines these colours in
  one place.
- Previously the red buttons had focus indicated by the text colour
  changing from white to blue.  This was quite hard to see, instead
  change the button colour to blue (as is done for the white buttons).
  A darker shade of blue is used so that there is still good contrast
  with the white text.
- Update the reds (buttons and main screen background) with the
  branding-approved red: the official colour palette says Pi Red is
  #cd2355
2023-10-18 17:01:47 +01:00
David Turner
60e5e2a4b5 Fix various keyboard focus issues
- Make write confirmation popup modal
- Force focus on the write confirmation popup when it opens
- Force focus on the error popup when it opens
- When the hw select popup opens, force focus on the ListView instead of
  on the currentItem, because the latter doesn't work when the list is
  empty.
- On embedded, when the settings popup closes, force focus back to the
  usecustomisation dialog
2023-10-18 13:39:59 +01:00
David Turner
4ad4276154 Don't hide "use customization" when editing settings
Previously, if you clicked "edit settings" in the "use customisation"
msgbox then the flow got a bit confusing, when you saved settings the
"use customisation" msgbox would have disappeared and you had to click
"next" and go back through again.  Instead, keep the "use customisation"
msgbox open when editing settings so when you save settings you are back
where you left it.

Also:
- Make "use customisation" modal so you can't click other things while
  it's open
- Separate windows in QtQuick can't be modal so we can't stop the user
  interacting with the main window while "edit settings" is open.  This
  could get confusing, so if they close the "use customisation" modal in
  the main window then close the settings window.
- Fix a bug where saved settings weren't recognised on startup, only
  after being saved during the session
2023-10-18 11:33:11 +01:00
Tom Dewey tom.dewey@raspberrypi.com
ecf992cb62 Rework OS Customization
In the new flow, it doesn't make sense to _not_ save the OS
customization parameters, so remove the ComboBox.

Additionally, our data model was failing to notify the UI of changes to
the saved settings state. Due to time constraints, I'm not able to
resolve the binding in the 'correct' manner, but I can introduce a
makeshift status signalling mechanism to prevent UI inconsistency.
2023-10-17 15:28:04 +01:00
David Turner
981c14e8a0 Enable arrow keys for OS list navigation
Allow use of left and right arrow keys for navigating the OS list.
Right arrow won't choose an image, it only enters sub-lists.
2023-10-17 15:39:05 +01:00
Tom Dewey
1b44ab73e7
Merge pull request #668 from cillian64/logo
Update rpi logo and its alignment/positioning
2023-10-17 15:31:57 +01:00
David Turner
73de734016 Fix focus change when opening HW select list
Previously it was not possible to select a HW device without a mouse
because the focus change to the HW list was not working.  This is
because an extra nested ListView had been left in.  Remove the extra
ListView and set the focus target correctly.
2023-10-17 14:56:11 +01:00
David Turner
a2c7deac70 Remove padding from progress bar
Seems like there's a weird Qt bug in the ProgressBar widget where giving
it padding means the white progress indicator doesn't actually start at
the left edge of the bar or extend to the right edge of the bar.  So
just remove the padding from ProgressBar because it's not doing much.
2023-10-17 10:28:52 +01:00
David Turner
e3586e72b7 Update rpi logo and its alignment/positioning
- Update back to colour logo
- Change logo alignment and positioning to make it generally
  left-aligned, have some nice padding above and below it, and to not
  occupy the full window width.
2023-10-17 10:24:55 +01:00
Tom Dewey tom.dewey@raspberrypi.com
f2718a05ff qml: Increase device selector icon size to 64x64 2023-10-16 11:47:24 +01:00
Tom Dewey tom.dewey@raspberrypi.com
2b2fd7de8a qml: Remove customisation button, roll into flow
This patch carries a translation risk, as we change the default
progression button.

Remove the customisation button all together, and make the customisation
options something we offer as part of flashing an image that
has that capability.

While this adds an additional click to the flash sequence, it should
provide a steer to people who are flashing customisable images to make
use of this capability, potentially avoiding an additional pass through the
Imager.
2023-10-12 12:28:19 +01:00
Tom Dewey tom.dewey@raspberrypi.com
9fb9fca065 qml: use "Raspberry Pi Device" as selection hint 2023-10-12 12:28:19 +01:00
Tom Dewey tom.dewey@raspberrypi.com
e8663baf34 qml: Relayout buttons for [3,1,1,1]
This change adjusts the layout for the progress bar, write button and
cancellation buttons such that they are all placed on the same layout
'row', with the progress bar stacked as before, and the
write/cancel/cancel buttons stacked as a column.

This is not ideal, but probably as sensible as we can get inside this
layout paradigm.
2023-10-12 12:28:19 +01:00
Tom Dewey tom.dewey@raspberrypi.com
bcdee1818d qml: Move write button, assign explicit cells
1) Resize the window back to 680dip default widths. We don't need the
   extra space now.
2) Reduce Row spacing within the grid layout. We need all the space we
   can get.
3) Assign layouts to explicit cells, at least for selection options and
   write. This layout isn't really scaling to the amount of data we want
   to provide, but we'll make do for now.
4) Mark selection buttons as accessibility ignored when the hwpopup is
   active.
2023-10-12 12:28:19 +01:00
Tom Dewey tom.dewey@raspberrypi.com
758853e8a8 qml: Size-down the default window to 730 width.
Back-calculated from 1280/1.75, this should just about fit on a 1280x720
format display at 1.75x scaling.
2023-10-12 12:28:19 +01:00
Tom Dewey tom.dewey@raspberrypi.com
be8956a87e qml: Align 'Cog' to RHS. 2023-10-12 12:28:19 +01:00
Tom Dewey tom.dewey@raspberrypi.com
4fb84ff3e8 qml: Filtering types
Introduce 4 filtering types per device spec:

- "exclusive", which only includes OS' that match one of the specified
  tags, and discards any OS that is untagged.
- "exclusive_prefix", which only includes OS' that prefix-match one of
  the specified tags, discarding any OS that is untagged.
- "inclusive", which discards any OS that doesn't include one of the
  specified tags, but includes untagged images.
- "inclusive_prefix", which discards any OS that doesn't prefix match
  one of the specified tags, but includes untagged images.
2023-10-12 12:28:19 +01:00
Tom Dewey tom.dewey@raspberrypi.com
a4a90361a3 qml: Use a ListView for the hw selector 2023-10-12 12:28:19 +01:00
Tom Dewey tom.dewey@raspberrypi.com
c7fa7504fe qml: Rebalance button widths
Removed preferred widths for OS, device buttons, and set one for the
storage button. This allows the storage label (generally the longest)
to fit on the control face reliably.
2023-10-12 12:28:19 +01:00
Tom Dewey tom.dewey@raspberrypi.com
8291e00934 qml: Include device icon, desc in model 2023-10-12 12:28:19 +01:00
Tom Dewey tom.dewey@raspberrypi.com
d603d29671 OS selector: Return to home after close
Prior to this change, you could enter a submenu of the OS selector,
close the window, and then change device filter - presenting stale information
when you went back in to the OS selector.

Work around this by resetting the OS selector sequence when you close
the OS selector window.
2023-10-12 12:28:19 +01:00
Tom Dewey tom.dewey@raspberrypi.com
3f665e01b4 Device-first OS list filtering
Rather than a drop down dialog, which could present users with images
that may not run on their hardware, allow selection of Raspberry Pi as a
first stage. If users adopt this feature, they are presented with a
subset of images that we know will actually run on their hardware.

This is achieved by leveraging @maxnet's excellent OS filtering scheme.

Future work will attach image and description support to this OS list.
2023-10-12 12:28:19 +01:00
David Turner
dbf9757796 Show options when opening image by file association
If you load a custom image by running `rpi-imager my_image.img.xz` then
the Advanced Options button is not shown.  This is triggered if you set
a file association to load rpi-imager and then double-click an image
file.

The fix is simply to set the visibility on this button on start-up
(custom images set on the command-line are loaded before this).

Fixes #451
2023-10-04 14:43:28 +01:00
Floris Bos
a382f985f3 Add support for model selection filtering. Bump version number. 2023-09-23 19:51:45 +02:00
Kemal Hadimli
dcb392cbf0 feat: Allow image drag/drop 2023-08-13 00:21:31 +01:00
Floris Bos
b93fe29617 Apply advanced settings prompt: offer "no" without clear options
By request.
When prompted if previous settings should be applied, offer a
"no" button that only applies this time, and does not clear
settings.
2023-03-24 14:26:43 +01:00
Ludwig Nussel
5d971375f6 Add compile time options for telemetry and updates 2022-02-14 16:03:02 +01:00
Floris Bos
033ff07abf Move source files to /src 2022-02-14 10:07:15 +01:00
Renamed from main.qml (Browse further)