17 Commits

Author SHA1 Message Date
sizzlesloth
71431bd5de Text box can be used to set DPI (#960)
* Add dpi_entry GtkEntry objects to UI file and Python.
Find and apply closest resolution in self.resolutions.
[Needed?] Store value on textbox focus in.
[Needed?] Do not apply DPI value if the same as previous value.
DPI entry and resolution sliders affect each others' values.

* Remove pointless recursive logic.
Remove focus methods.

* Calculate DPI text box width based on max supported resolution.

* Renamed methods/signals to be consistent with current convention.

* Add a 'focus-in-event' signal to the DPI entry field.
Pass reference to ResolutionsPage when initialising ResolutionRow.
Use reference to invoke `ResolutionsPage._on_row_activated()`.
Do not toggle Revealer on DPI entry text box focus-in-event if Revealer is already expanded.
Grammar: dpi -> DPI

* Add type hints.
Prefix unused vars with underscores.
Actioned suggested import order from linter.

* Actually apply the closest res value (oops).
Apply the res value on focus-out-event.

* Toggle allow editing of DPI entry if 'disable' button clicked.

* Use set_sensitive() on DPI entry.

* rm pointless var.

* Create custom class for DPI text entry to circumvent assertion warning.
Grab DPIEntry focus when revealing ResolutionRow.
Revert import order.
Removed unused 'previous DPI value' var.
Remove 'private' convention underscore from ResolutionsPage._on_row_activate().
Remove callback method for DPI entry on ResolutionRow.
UI file uses DPIEntry.
Remove insert-text signal for DPIEntry from UI file.

* Line lengths

* Removed unused import.
Underscored unused parameter (PEP convention).

* Reverted underscore convention as to not break existing stuff.

* Use underscore convention, but also use it when invoking the method.

* Renamed handler name for ResolutionsPage to match method.

* Clarified docstring.

---------

Co-authored-by: Dan <64416644+brittle-bones@users.noreply.github.com>
2024-07-24 22:17:09 +00:00
Yaroslav Chvanov
e83a987f05 ui: use margin-start/end instead of margin-left/right
Fixes a deprecation warning.
2023-03-03 16:35:42 +03:00
Yaroslav Chvanov
58639e6008 ui: regenerate all UI files using current Glade version
This does not include all changes as for some reason Glade removes some
widgets and actions.
2023-03-03 16:35:36 +03:00
Yaroslav Chvanov
e08c018bc5 ui: require Gtk 3.22 in all UI files
Some of them produced warnings about certain properties being available
only in Gtk 3.22 or higher.
2023-03-03 16:02:15 +03:00
Stephan Lachnit
48279544f5 ResolutionRow Redesign
Adds buttons to set a resolution active or disabled.

Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2022-12-26 22:42:25 +03:00
Jente Hidskes
4d5a798814 ResolutionRow: remove delete button
This hasn't been added yet and likely won't in the foreseeable future.
2019-01-22 09:10:35 +10:00
Piotr Drąg
cc59902a65 Use Unicode typography in user-visible strings
See https://developer.gnome.org/hig/stable/typography.html
2018-09-12 18:44:29 +02:00
Jente Hidskes
0d54a60df2 Add context where needed for translators 2017-08-23 12:38:51 +10:00
Jente Hidskes
cd6c528608 UI files: unmark placeholder strings as translatable 2017-08-21 11:06:38 +02:00
Jente Hidskes
f17e341dbe ResolutionRow: add label to highlight the active resolution
Fixes #80, #81.
2017-08-21 16:27:24 +10:00
Jente Hidskes
182f44ed40 MousePerspective: do not use show_all()
This again interferes with hiding widgets on purpose.
2017-08-17 09:50:52 +02:00
Jente Hidskes
d41b2ce547 ResolutionRow: rename title_label to dpi_label 2017-08-17 09:50:46 +02:00
Jente Hidskes
16256230be ResolutionRow: block the scale's value changed handler when initialising
This prevents the profile from becoming dirty while the MousePerspective
is initialising itself on a new device
2017-08-11 11:07:58 +01:00
Jente Hidskes
ee6f91bd49 ResolutionRow: do not display frame label "Resolution"
See #79
2017-08-04 08:49:42 +01:00
Jente Hidskes
83e215f08f ResolutionRow: remove "Resolution x"
See #75 and #79
2017-08-04 08:49:42 +01:00
Jente Hidskes
b78aade8aa data/ui: add tooltips to control widgets
Every control widget should have a tooltip to explain its purpose.

Fixes #40
2017-07-27 09:36:42 +02:00
Jente Hidskes
fa5c72c8c0 data: move ui files into subdirs
It's getting quite messy to let's put in some structure.
2017-07-27 09:36:41 +02:00