-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
1 parent
71f96db
commit 71431bd
Showing
4 changed files
with
94 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters