1
0
Fork 0
mirror of synced 2024-06-27 02:30:31 +12:00
Commit graph

1457 commits

Author SHA1 Message Date
loathingKernel ca9bf7c1e8 StaticStylesheet: Share common properties by setting common object names 2023-03-03 16:51:26 +02:00
loathingKernel 76a616615b Resources: Move some more stylesheets into the static CSS 2023-03-03 14:16:04 +02:00
loathingKernel 372b276157 [Icon/List]Widget: Disable focus on buttons
When the button gets clicked on, it receives keyboard focus. Disabling the button
afterwards leads to `focusNextChild` getting called. This makes the scrollarea
trying to ensure that `nextChild` is visible, essentially scrolling to a random widget
2023-03-02 19:57:31 +02:00
loathingKernel 1dd8856a29 Resources: Add static stylesheet for widgets that need special handling irregardless of theme
The static stylesheet properties are always applied. If there is a theme
stylesheet to be applied, they are appended in the end of the theme
stylesheet.

This removes stylesheet properties from the library widgets, some special
buttons and the queue worker labels.

To update the static stylesheet first edit `rare/resources/static_css/stylesheet.py`
and then execute it as a script.
2023-03-02 15:36:45 +02:00
loathingKernel 46664f3577 Fix a few minor errors 2023-03-02 01:05:53 +02:00
loathingKernel 0e161eb4d2 Use Worker base class for runnables in legendary settings and ubisoft widget.
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-27 23:49:44 +02:00
loathingKernel 1842ec138e App: Rename rare_core attr to rcore
Makes it equal to the rest of the application

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-27 23:47:24 +02:00
loathingKernel ecee2e24e5 QueueInfoWidget: Set ellipsis text even without an old InstalledGame 2023-02-22 21:43:00 +02:00
loathingKernel 5ba368a5bf SideTabContainer: Use a signal to update the title instead of monkeypatching setTitle method into the widget
Widgets that need to implement a title should be of a dual subclass
of any `QWidget` subclass and the `SideTabContents` class which provides
the signal.
2023-02-21 15:27:52 +02:00
loathingKernel a3d09ae288 Code cleanup: Use pass instead of ellipsis (...) for abstractmethods
Fix a few other issues pointed out by MultisampledNight

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-20 15:31:04 +02:00
loathingKernel 7a04f7b5be DownloadsTab: Replace n/a with ellipsis 2023-02-20 14:58:22 +02:00
loathingKernel 00a0b36e75 LaunchDialog: better layout name 2023-02-20 14:58:01 +02:00
loathingKernel c2da5bceb8 QueueWidgets: Re-text Update now to Download now
Also rename the widget classes and files for clarity
2023-02-20 14:52:45 +02:00
loathingKernel 3e827f4ece ElideLabel: Enable word-wrapping for elided labels.
Word wrapping allows ElideLabel to resize first inside flexible sized
areas such as the contents widget of a scrollarea. This allows the contents
widget to properly resize itself to avoid horizontal scrolling.

Word-wrapping also enables the widget to resize vertically. To avoid that
ElideLabel is set to a fixed height based on font metrics. An overloaded
method `setFixedHeight` has been added to disable it when desired.

EglSyncGroup: Replace estimated path label with a ElideLabel because
the displayed message was expanding the scrollarea.
2023-02-20 14:26:14 +02:00
loathingKernel 76068014b8 Misc: Remove connectSlotByName() in single file invocation 2023-02-20 14:16:45 +02:00
Stelios Tsampas 05e538ca5c
Update rare/components/tabs/downloads/groups.py
Co-authored-by: multisn8 <contact@multisamplednight.com>
2023-02-20 11:32:48 +02:00
Stelios Tsampas ca3a2893f9
Update rare/components/tabs/downloads/__init__.py
Co-authored-by: multisn8 <contact@multisamplednight.com>
2023-02-20 11:32:28 +02:00
Stelios Tsampas e748468078
Update rare/components/tabs/games/game_info/move_game.py
Co-authored-by: multisn8 <contact@multisamplednight.com>
2023-02-20 11:31:03 +02:00
Stelios Tsampas cda4668486
Update rare/components/tabs/games/game_widgets/game_widget.py
Co-authored-by: multisn8 <contact@multisamplednight.com>
2023-02-20 11:28:53 +02:00
loathingKernel 4ef73b48ef Dialogs: Homogenize dialog titles 2023-02-18 19:36:49 +02:00
loathingKernel e6c703f873 ExtraWidgets: Cleanup some code 2023-02-18 18:16:29 +02:00
loathingKernel dd6df40e40 ExtraWidgets: Remove SideTab widgets and update imports 2023-02-18 17:33:25 +02:00
loathingKernel 5938835249 ExtraWidgets: Remove IndicatorLineEdit and PathEdit and update imports 2023-02-18 17:29:41 +02:00
loathingKernel 97def45a7e Cleanup: Remove some unused imports 2023-02-18 17:27:18 +02:00
loathingKernel ff81f38dd4 Misc: Shellcheck 2023-02-18 17:25:55 +02:00
loathingKernel f8c0ffd938 ExtraWidgets: Copy SideTab widgets into their own file
The new file is unused at the moment
2023-02-18 16:44:09 +02:00
loathingKernel 2d0f7aa51d ExtraWidgets: Copy IndicatorLineEdit and PathEdit into their own file.
The new file is not used at the moment.
2023-02-18 16:40:30 +02:00
loathingKernel ecc1bd8d5c IndicatorLineEdit: Run edit callback function asynchronously
Execute the edit callback function in a thread. By executing it in a thread
we don't have to wait for longer validation procedures to finish to
continue updating the UI. This is most notable in the MoveGamePopUp
which is heavy on disk IO.

Because we cannot use special text formatting in a thread, the
indicator messages have been reworked while also becoming extensible.

A dictionary of extended reasons can be specified through the
`IndicatorLineEdit.extend_reasons()` method.

The dictionary has to follow the following format
```
python
{
	MyIndicatorReasons.REASON: self.tr("Reason message")
	MyIndicatorReasons.OTHER_REASON: self.tr("Other reason message")
}
```

In the above example `MyIndicatorReasons` is a subclass of `IndicatorReasons`
which should be specified as follows

```
python
MyIndicatorReasons(IndicatorReasons):
	REASON = auto()
	OTHER_REASON = auto()
```
2023-02-18 14:37:37 +02:00
loathingKernel 7e4ded70b5 MoveGamePopUp: Don't translate or do any text formatting in path_edit callback function 2023-02-17 13:29:59 +02:00
loathingKernel da49a91a03 Utils: return correct value type string for get_size() 2023-02-17 13:23:44 +02:00
loathingKernel 922b1472dd IconWidget: Fix typo in install_btn css selector 2023-02-17 10:49:34 +02:00
loathingKernel 9b856e5f8e InstallDialog: Allow downloading 0 size DLCs
There are DLCs (for example KingletAztec) which are essentially
entitlements, a single file the allows access to already downloaded
content. Updates for such DLCs only change the metadata version number
without any actual new data. These DLCs are handled correctly by the
DLM, but our dialog would refuse to allow installing them due to 0 download
size. This change allows them to pass through the InstallDialog.

The other issue, which I don't know if it was only a result of our faulty
validation at startup or could occur in legendary too, is that a DLC might
be marked with needing verification. Currently we don't have a way of
verifying DLCs, so when verifying the game, we will also set the same
state for any installed DLCs. In effect verifying the game successfully
will also mark any DLCs as correct.
2023-02-17 10:37:44 +02:00
loathingKernel e9cbdb22bc RareCore: add dequeue_worker() method to RareCore
It will "properly" remove a worker and update the connected widgets.
2023-02-16 17:07:02 +02:00
loathingKernel b405ff615e RareCore: Return a list instead of an iterator to freely use remove() 2023-02-16 16:42:32 +02:00
loathingKernel d8c31a05c2 GamesTab: Remove timing debug message 2023-02-16 16:22:31 +02:00
loathingKernel 5593dfb984 MainWindow: Don't wait for the workers to finish.
Instead ask the user if the queue should be cleared and return to normal execution.
2023-02-16 16:19:52 +02:00
loathingKernel e40cfaafac MainWindow: Implement worker queue in status bar
The active workers are placed in a static container on the left side.
The queued workers are placed in a scrollarea on the right side of the
status bar. The scrollbars are disabled but dragging works.

Exiting with active workers will pop up a message for confirmation. Rare
will clean the queued workers but the active ones will be waited on until
they finish.
2023-02-16 10:52:13 +02:00
loathingKernel f2dedaaefc ElideLabel: Set text on resizeEvent 2023-02-16 10:47:23 +02:00
loathingKernel a438eb764b MoveGamePopUp: Don't refresh indicator on widget.update 2023-02-16 10:46:47 +02:00
loathingKernel e34800cfd3 LibraryWidgets: Remove unused code and use multiline f-strings for css text 2023-02-15 20:40:20 +02:00
loathingKernel 0bd7af3d77 MoveGamePopUp: Use ElideLabel for the warning 2023-02-15 19:58:28 +02:00
loathingKernel 6e4081177d VerifyWorker: Remove unused imports 2023-02-15 19:49:04 +02:00
loathingKernel efcbea91cf MoveGamePopUp: Make the warning label always visible 2023-02-15 19:48:48 +02:00
loathingKernel 6c0663771c GameInfo: Make widgets react to changes from RareGame's widget.update signal
Note: the `__update_widget()` method, while it doesn't have any visible delay
has the potential for improvement. I didn't do it because it felt like
premature optimization.

MoveGamePopUp: update it to use RareGame and it's signals

RareGame: Add `install_path` attribute and change `needs_verification` setter
Now both setters will update the local `igame` attribute and save it too.

MoveWorker: Update it to use RareGame.
Other changes include moving "same-drive" moving into the worker and using
`os.path` methods instead of `PathLib`

SteamGrades: Remove worker, it is implemented in RareGame now.
2023-02-15 16:59:33 +02:00
loathingKernel 034c6f2ade ImageManager: Increase margin on desktop icons
Add size presets for wide covers
2023-02-14 10:21:38 +02:00
loathingKernel 9f408772e3 RareGame: Resolve and cache steam grade 2023-02-14 10:20:59 +02:00
loathingKernel abba86e10b RareGame: Create intermediate class RareGameSlim between RareGameBase and RareGame
The `RareGameSlim` class is useful mostly in the Launcher as it doesn't
depend on `ImageManager`. I should hold anything required by the Launcher.
2023-02-09 01:37:53 +02:00
loathingKernel c0d9e5c845 ImageSize.Preset: Add equality test 2023-02-08 17:09:24 +02:00
loathingKernel 31757840f0 Paths: Use common dictionary for suffixes 2023-02-08 16:47:46 +02:00
loathingKernel 71aa440e0b GameWidget: Use __slots__ to satisfy forward ui declaration
This way `ui` won't get any typing but this is internal and we can
take care of it until a better method is found to satisfy both.
2023-02-08 15:14:50 +02:00