Icon names for generic full-color icons are sometimes set for streams
(Firefox for example). Some apps seem to even use legacy icon
names.
We factor out the icon lookup into a function and place the AppInfo
before the icon name lookup in priority.
Closes#2740
Otherwise we could calibrate the device to be upside down by doing a
reverse Z (starting lower-right). If the device is mounted upside-down
this should be fixed elsewhere.
Our along_axis() helper would compare the input value against both x and
y of the reference point. This can lead to misdetections of the distance
to the desired points, e.g. if the upper-left reference point is 100/100
and the upper-right point is a clearly-wrong 99/2500, the alignment
would succeed because the x-axis is within the threshold.
This would sort itself out later since the lower points are difficult to
get right then, but let's fix this by checking the desired alignment
only. This way a misclick happens on the actual misclick, not on the
next point(s) in the sequence.
The code was written to (sort-of) accomodate for the four calibration
points to happen in any sequence. Except we don't care about that, we do
it in a Z shape starting top-left - so let's simplify the code to check
for that sequence.
For anyone calibrating the tablet the threshold doesn't really matter,
it's in their own interest to be as precise as possible. Meanwhile, for
testing a larger threshold makes life a lot easier as we don't need to
be that exact to go through the calibration sequence.
Finally, for devices with calibration seriously out of whack a larger
threshold allows those devices to be used.
The keyboard test relies on both of those programs, the network
panel test on Xvfb. Where we don't have those programs installed (e.g. a
pure Wayland session) we cannot run the test.
Also, remove the list box placeholder since the button will appear
even when the list is empty. The button now acts like a placeholder
too.
Co-authored-by: Matthijs Velsink <mvelsink@gnome.org>
As suggested by Matthijs Velsink, it is much cleaner handling UI
related things in the .ui file.
This is a cleaner version of commit 3f612ab81
Related to !2656, fixing #3086
AdwStatusPage has a built-in GtkScrolledWindow and it can't be used
with other widgets. Put the GtkStack directly in AdwDialog:property
instead.
Doing so, the AdwStatusPage no longer needs the vexpand property.
Use AdwWindowTitle and show the printer name using
AdwWindowTitle:subtitle. This gives more room to show the printer name,
especially when the name long, which is prone to get ellipsized.
The GtkSearchEntry dialog was eating up the Escape key press events,
causing the dialog not to close as expected.
This adds a controller to explicitly handle key-press events on a
dialog level, which will close the dialog for the Escape key and
just propagate the event down the chain otherwise.
Fixes#3086
Laptops aren't the only devices GNOME cas run on that have an internal
screen, there are also smartphones and all-in-one desktops. This updates
the a label and some translators comments to reflect that.
Signed-off-by: Adrien Plazas <aplazas@gnome.org>
- Use AdwPreferencesPage, AdwPreferencesGroup and
AdwStatusPage
- Remove the .view style class
- Add the .boxed-list style class to the jobs list box
- Add mnemonic to the "Clear All" button
Also:
- Use gtk_button_new_from_icon_name instead of
embedding a GtkImage into a GtkButton
- Remove margins from "widget_button" and "widget_nocalib",
because suffix widgets from AdwActionRows already have
margins
- Place the "Not Calibrated" label before the switches and
use header capitalization in it, as advised by HIG
- Decrease the "widget_nocalib" margin-end to "6", so it doesn't
look too far from the switches
Instead of showing an empty space as the placeholder for the "Port" row
subtitle, use "—", like Nautilus and Disks does when a value is empty,
for example.
These rows aren't activatable, so using a mnemonic isn't necessary.
Another thing is that the rows aren't using
AdwPreferencesRow:use-underline, which makes the row title to look
broken.
Remove the underlines and also add a mnemonic to the Camera switch
row.
Whether libwacom knows about a tablet has no effect on whether the
tablet works, only whether we know how to map it, which styli are
available, etc.
Instead of pretending there is no tablet connected let's use the
libwacom fallback tablet instead. As of libwacom 2.11 that defaults to a
built-in tablet (the vast majority of devices these days) which means we
can at least map this to an output, calibrate it etc.
Doing so, the dialog will be adaptive in when the window
width is narrow.
Also, ditch the .linked style class, because the buttons
are now in a reflowing grid.
This allows to copy the row contents without opening the System
Details dialog. This can be useful if the user just wants to
copy the hardware model, for example.
Remove the gnome_rr_* bindings and substitute them with the respective
calls from the CcDisplayMonitor. This way we get the same monitor names
as the display panel.
Closes#1821