1
0
Fork 0
mirror of synced 2024-09-12 23:54:24 +12:00
Commit graph

1566 commits

Author SHA1 Message Date
loathingKernel
9017826b16 StoreAPI: Log exception 2024-05-16 13:58:59 +03:00
loathingKernel
4bb1fb10ee SteamGrades: Print an error message instead of the exception 2024-05-16 13:58:10 +03:00
loathingKernel
4497a1c712 Project: Use vdf package on all platforms
Useful on Windows too, to export games to Steam as "Non-Steam Game"
2024-05-16 13:32:00 +03:00
loathingKernel
07fa7890cf RareGame: Update protondb grade every 3 days even if it already exists. 2024-05-16 13:18:05 +03:00
loathingKernel
1d8ae15ea9 SteamGrades: Fix exception when trying to get file timestamp
if the file does not exist.

At the same time fix some pylint warnings.
2024-05-16 13:15:48 +03:00
loathingKernel
8ebcc3a700 LoadingWidget: Start playing movie once the widget is visible if autostart is enabled
Fixes a subtle bug that would cause increased CPU usage due to spawning
multiple singleshot times with very short timeouts (15ms) until the Store
tab was loaded.
2024-05-15 22:48:52 +03:00
loathingKernel
0c848c41b0 WineResolver: Do not unset 'DISPLAY' when running silently
When unsetting DISPLAY, Wine hangs after executing a command, and doesn't
allow for other instances of wine to start, i.e. games do not launch, with
a cryptic error. This also fixes the previously observed issues with
`winepath.exe` and `reg.exe` never exiting.

This is likely due to the newly introduced Wayland driver. This behavior
can be observed when Wayland support is compiled into Wine and the wayland
driver is enabled in the prefix's registry. In this case, if running under
X11 and DISPLAY is not set, Wine will hang, and the process never returns.
2024-05-15 15:13:51 +03:00
loathingKernel
1c886535a5
commands: add __init__.py for module discovery 2024-03-06 17:57:48 +02:00
loathingKernel
14bde0a23c
WishlistWidget: re-order comboboxes to match the order in the library
* Move filter combobox at the beginning of the top panel and move the order
combobox after it to replicate the order in the library view.
2024-02-25 21:35:45 +02:00
loathingKernel
89340f331b
StoreAPI: comment unused and erroneous code 2024-02-25 21:35:45 +02:00
loathingKernel
fb0d5bbe10
Store: Fix various wishlist issues.
* Use horizontal scrollarea for free games. Based on the same idea as
WrapperSettings scrollarea. Both need some adjustments.

* Remove debugging dialogs. Need a better way anyways to debug.
2024-02-25 21:35:45 +02:00
loathingKernel
766557924a
Store: Unset autoFillBackground for some scrollareas 2024-02-25 21:35:45 +02:00
loathingKernel
1fab13fd92
Store: Fix rebase errors 2024-02-25 21:35:44 +02:00
loathingKernel
7a2a6458ed
Store: Update details page 2024-02-25 21:35:44 +02:00
loathingKernel
9ec349e2d1
WIP 2024-02-25 21:35:44 +02:00
loathingKernel
2a2458bacb
Store: Update details page
* Add a big back button in details page.

* Add static CSS to render QPushButtons as flat when the `flat` property is set

* Remove outer scroll areas from details page since the page is already adjustable

* Remove scroll area from the requirements widget because ElideLabels are already used in it.

* Fix crash when sorting the wishlist
2024-02-25 21:35:44 +02:00
loathingKernel
816c5f3de9
Store: adapt image sized 2024-02-25 21:35:44 +02:00
loathingKernel
b4a26b5932
Store: Finalize store design 2024-02-25 21:35:43 +02:00
loathingKernel
fda82b17cf
Shop: Use a single QGridLayout instead of left and right VBoxLayouts 2024-02-25 21:35:43 +02:00
loathingKernel
91af16b76d
Store: Exploratory changes for GraphQL API 2024-02-25 21:35:43 +02:00
loathingKernel
f6396f488a
Store: Exploratory changes to the store page
Important changes:
* Refactored QtRequests to accept parameters for `GET` operations
* Infer response data type from content-type header
* Support caching to disk, a manager with this set prefers the cache
* Support multiple handlers for a single request (unused, possibly pointeless)

* Subclass `ShopImageWidget` for all widgets used in the shop
* Request a resized image instead of the original one
* Fix the search and browse functions
2024-02-25 21:35:43 +02:00
loathingKernel
7246078df3
ShopGameInfo: Design it to me similar to GameInfo 2024-02-25 21:35:43 +02:00
loathingKernel
247b2c947a
ShopImageWidget: Design it to me similar to IconGameWidget 2024-02-25 21:35:43 +02:00
loathingKernel
b6458b1bfc
SearchResultItem: Use ShopImageWidget as a base 2024-02-25 21:35:42 +02:00
loathingKernel
d76fc2b68b
ShopWidget: Fix layouting again 2024-02-25 21:35:42 +02:00
loathingKernel
2db34324af
ShopWidget: Cleanup shop layout 2024-02-25 21:35:42 +02:00
loathingKernel
b812e38fb8
Wishlist: Remove embedded title 2024-02-25 21:35:42 +02:00
loathingKernel
d3b591952f
Store: Use ElideLabel for requirements 2024-02-25 21:35:42 +02:00
loathingKernel
6b15c0f2cf
Store: Clean up store UI by using library widgets 2024-02-25 21:35:41 +02:00
loathingKernel
c1b92c3ae5
QueueBaseWidget: fix button positioning 2024-02-25 15:36:00 +02:00
loathingKernel
1c578e354e
HeadBar: Fix commented code 2024-02-25 15:35:34 +02:00
loathingKernel
7b810173da
Downloads: unset autoFillBackground for queue scrollarea 2024-02-24 13:56:15 +02:00
loathingKernel
f3d870cebb
ButtonLineEdit: Remove stylesheet, it doesn't seem to do anything 2024-02-24 13:12:00 +02:00
loathingKernel
e50015c25c
WrapperSettings: Improve widget structure
* Remove the annoying stacked widget, instead create a double layout in
the container and place a label in that to hold the placeholder message.

* Implement the scroll area as a custom widget. This custom widget installs
an event filter on the container to adjust the scrollarea size when the
container size changes.
2024-02-24 13:11:28 +02:00
loathingKernel
6cfec6c718
Style: Update Rare colorscheme and remove some styling from WrapperSettings widget 2024-02-24 02:41:05 +02:00
loathingKernel
570261395a
SideTabContainer: Do not darken background inside scrollarea 2024-02-24 02:27:14 +02:00
loathingKernel
2e8dcc49ca
Settings: Translate titles 2024-02-24 02:25:47 +02:00
loathingKernel
379cbd2f89
Painter: Use QPalette.Window as background color 2024-02-24 02:22:25 +02:00
loathingKernel
ae69413ddb
InstallDialog: Remove inline stylesheet, adjust the font. 2024-02-24 01:51:45 +02:00
loathingKernel
8a421b08f8
Stylesheets: set minimum height in ex 2024-02-23 10:47:31 +02:00
loathingKernel
e8e39fa391
Stylesheets: Remove padding from progressbar 2024-02-23 00:02:15 +02:00
loathingKernel
49c06aef79
RareStyle: Use px instead of em 2024-02-22 21:22:28 +02:00
loathingKernel
1c027fc14a
Steam: Fix crash if Steam is not installed 2024-02-22 21:19:05 +02:00
loathingKernel
980bac5c4e
LaunchSettings: Fix browsing the wrong directory if override exe is set
The dialog would default to CWD because the contents of the line edit
where not an absolute path.
2024-02-22 17:26:38 +02:00
loathingKernel
d397912247
StyleSheets: Fix padding in QLineEdits used is Table/Tree/ListViews 2024-02-22 17:12:51 +02:00
loathingKernel
243b92248e
MainTabWidget: Remove icon from account tab 2024-02-21 20:55:10 +02:00
loathingKernel
715ac06719
Launcher: Move UI files under commands to mirror project structure 2024-02-21 20:39:10 +02:00
loathingKernel
5bf353ec37
Rare: Replace QToolButton with QPushButton
QToolButton is not really designed to be used in the way we did and since
QPushButton supports having a menu attached to, we can replace tool buttons
in most cases.

* Fix the presentation of the TabButtonWidget by updating RareStyle's css

* Reduce the size of the top tab bar to save vertical space.

* Remove infoLabel property
2024-02-21 20:25:03 +02:00
loathingKernel
8dbce8e9f2
Rare: rename icon function to qta_icon 2024-02-21 13:30:41 +02:00
loathingKernel
f542e11b25
HeadBar: better alignment to center 2024-02-20 13:41:47 +02:00
loathingKernel
ddbd94354c
UI: Update LegendarySettings UI file 2024-02-20 13:36:06 +02:00
lennard
91d8cb336d
Update languages 2024-02-19 23:54:58 +01:00
lennard
f2c63aa3b4
Set desktop file name to fix default icon on wayland 2024-02-19 22:44:12 +01:00
loathingKernel
5b217e0b15
Overlay: remove print statements 2024-02-18 12:54:24 +02:00
loathingKernel
d16b3d5d68
Runners: rename proton to steam 2024-02-18 12:50:35 +02:00
loathingKernel
68ea7b9ca1
Merge branch 'develop' of github.com:loathingKernel/Rare into develop 2024-02-17 19:00:33 +02:00
Stelios Tsampas
db3cf68d19 LaunchSettings: Work around path separator difference on Windows 2024-02-17 18:38:29 +02:00
loathingKernel
5359b73c35
Settings: Use membership instead of double inheritance 2024-02-16 13:03:27 +02:00
loathingKernel
6db35d1f1e
RareApp: Call quit on instance 2024-02-16 12:28:00 +02:00
loathingKernel
e776ed457a
WineSettings: Order executable before prefix 2024-02-16 12:27:06 +02:00
loathingKernel
582b83c12b WIP 2024-02-12 21:52:08 +02:00
loathingKernel
3fe02e5026 GameProcess: Reset tried connections after accepting the dialog.
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2024-02-12 21:52:08 +02:00
loathingKernel
6a747ce0f7 Rare: Move sub-commands implementations in the commands subfolder
Right now we have two commands, and with possible third one comming soon.
2024-02-12 21:52:08 +02:00
loathingKernel
2f84a501d5 Launcher: Color output to STDERR as a slight red 2024-02-12 21:52:08 +02:00
loathingKernel
b7b1bc6406 RareSettings: Use QDesktopServices to open the file manager for us 2024-02-12 21:52:08 +02:00
loathingKernel
6be9eec3ef Rare: Offline mode kinda works again 2024-02-12 21:52:08 +02:00
loathingKernel
b1e537af43 Library: Initialize only one view on each run
Do not create multiple library views and remove the ability to switch
between them on the fly. Add an option in settings to select the preferred
view. The view will be used the next time Rare is started.
2024-02-12 21:52:08 +02:00
loathingKernel
7c3d5dc9e8 Library: Clean up how changing views works
* Pass python IntEnum objects instead ints for LibraryFilter/Order/View
  We only want to store them as integers to avoid QVariant gibberish

*
2024-02-12 21:52:08 +02:00
loathingKernel
4f4689e82b RareSettings: Add global options for style sheets and color schemes
* Add an option to select the library view mode.
  This will allow us to instantiate only one library view at startup,
  reducing time and complexity of the process.
2024-02-12 21:52:08 +02:00
loathingKernel
3313f15c9f WineResolver: Fix proton command invocation 2024-02-12 21:52:08 +02:00
loathingKernel
52d2ca7cc7 Config: Re-arrange arguments to match the rest of the function signatures 2024-02-12 21:52:08 +02:00
loathingKernel
b84686aba6 Overlay: Clean old code 2024-02-12 21:52:08 +02:00
loathingKernel
2d3a8deec1 Rare: Update some strings 2024-02-12 21:52:08 +02:00
loathingKernel
8a3bdbdd91 Rare: Improve translation handling
* Remove base Qt translations from repo, load translations from Qt itself
* Prefix translation `qm` files with `rare_`.
* Rename `translation_source.ts` to simply `source.ts`
* If the selected language matches the system local, remove the option from the configuration.
2024-02-12 21:52:08 +02:00
loathingKernel
f088fc95b6 RareApp: Fix wrong logging qualifier 2024-02-12 21:52:08 +02:00
loathingKernel
284543a6d9 Rare: Decouple Rare's locale from legendary's
* Instead of using legendary's locale as fallback, use system't locale
as default.
* Do not hardcode language names and countries but use QLocale on
the translation filenames.
2024-02-12 21:52:08 +02:00
loathingKernel
94030055cf Wrappers: Add a combobox with existing wrappers for the user to choose from.
Add a combobox in the "Add wrapper" dialog, populated with existing
user-defined wrappers from other games.
2024-02-12 21:52:08 +02:00
loathingKernel
fb91a55f30 Dialogs: Use consistent dialog titles for the launcher's dialogs 2024-02-12 21:52:08 +02:00
loathingKernel
e8e4ed739b Remove some unused imports 2024-02-12 21:52:08 +02:00
loathingKernel
8df9b08e7e WrapperDialog: Use subtitle 2024-02-12 21:52:07 +02:00
loathingKernel
a104cf4518 Wrappers: Add WrapperDialog based on ButtonDialog for consistent look and feel 2024-02-12 21:52:07 +02:00
loathingKernel
1cfcb783c2 EnvVars: Add MANGOHUD as read-only 2024-02-12 21:52:07 +02:00
loathingKernel
a15a2fbbe2 OverlaySettings: Refactor to be more event-driven complaint 2024-02-12 21:52:07 +02:00
loathingKernel
f33c89a411 Library: Fix filtering while searching for games 2024-02-12 21:52:07 +02:00
loathingKernel
aadf795d21 Overlays: Reorder method assignments 2024-02-12 21:52:07 +02:00
loathingKernel
bb5b0f1585 Overlays: Update title strings 2024-02-12 21:52:07 +02:00
loathingKernel
98213d1ce5 HeadBar: Return LibraryFilter/Order object from current_filter/order instead of int 2024-02-12 21:52:07 +02:00
loathingKernel
49ad79e871 Rare: be more explicit when checking for running platform 2024-02-12 21:52:07 +02:00
loathingKernel
17066f9a67 Rare: cherry-pick some of sourcery suggestions 2024-02-12 21:52:07 +02:00
loathingKernel
8bde2c2c6d Rare: Import platform specific modules only on the relevant platforms 2024-02-12 21:52:07 +02:00
loathingKernel
0ea29bc941 HeadBar: Use int as the data type for the combo boxes and improve checks
Also fix an exception when the setting in the config was faulty we were
looking for the wrong data type in the combobox data.
2024-02-12 21:52:07 +02:00
loathingKernel
0ea4b1a824 Dialogs: Re-implement all dialogs on top of a few common super-classes
Also add a dialog to select optional downloads before verifying
and refactor the move widget into a full-fledged dialog.

To keep dialogs in a common format and allow them to share the same
properties, three classes of dialogs have been implemented inheriting from
each other.

The classes are `BaseDialog` -> `ButtonDialog` -> `ActionDialog`

* Basedialog: is the basis of all dialogs and is responsible for
rejecting close requests from the window manager and the keyboard.
It also restricts access to `exec()` and `exec_()` because they are harmful.
It serves as the basis of Launch and Login dialogs

* ButtonDialog: is offering buttons for accepting or rejecting the presented
option. It implements its own buttons and exposes abstract methods to
implement handling in them. It restricts access to `close()` because these
dialogs should always product a result.
It is the basis of Uninstall, Selective dialogs.

* ActionDialog: in addition to the ButtonDialog, it offers an action buttom
with to validate the form or to make the dialog unable to close. It serves
as the basis of Install and Move dialogs.

Accordingly all dialogs in Rare have been updated to use these classes.
2024-02-12 21:52:07 +02:00
loathingKernel
cd1743cb92 GameSettings: Re-strucure settings widgets
The default widgets only implement the settings for the `default` "app_name"
The game specific widgets sub-class the default widgets and implement
whatever they additionally need locally.

Remove multiple calls to save config and save when the game settings gets hidden.
2024-02-12 21:52:07 +02:00
loathingKernel
af6d7c5055 Various WIP
* Use `vars()` instead of directly accessing `__dict__`
* Remove `auto_update` from RareGame's metadata
* Correct check for updating the Steam App ID (We want to keep any changes from the user)
* Collect both Wine and Proton prefixes when removing overlay registry keys.
* Add few convenience functions in config_helper and paths.
2024-02-12 21:52:07 +02:00
loathingKernel
7a5bb0b732 RareGame: Use None for unset steam appid. 2024-02-12 21:52:07 +02:00
loathingKernel
36ad33b8f3 SteamGrades: Return the Steam game ID with the grade and store it.
This allows compatibility tools that use the SteamAppId environment
variable to make decisions or apply fixes do their job more accurately.

Also use the stored variable to provide a link to protondb through
the grade label in GameInfo.

The steam grades now use the orjson library to load Steam's ~6MB
database faster.
2024-02-12 21:52:07 +02:00
loathingKernel
07b5d381f0 SideTabContainer: Align top by default 2024-02-12 21:51:42 +02:00
loathingKernel
b67c391a26 Chore: fix argument name in keyPressEvent 2024-02-12 21:51:42 +02:00
loathingKernel
9eb5f2c51e Dialogs: Align contents on center when the WM doesn't respect the dialog size
Useful for `gamescope`'s `--force-windows-fullscreen` mode
2024-02-12 21:51:42 +02:00
loathingKernel
88b6e91530 BrowserLogin: Add dedicated application mode to Rare for the webview login page
Add a sub-application to Rare to launch the webview for logging into EGS.
The sub-application operates similatly to the `laucher` sub-application and
it is autonomous. After a successful login in returns the exchange code
to the standard output to be parsed and used by the login dialog.

The reason this implementation was chosen is because when pywebview uses
pyqtwebengine as the GUI library, we cannot launch it through Rare as
it tries to spawn a QMainWindow inside an existing event loop, which is
prohibited by Qt.

Despite that, EGS login page doesn't work correctly with QtWebEngine,
so on linux default to the GTK backend for pywebview, and this change
helps keeping applications using different toolkits separate.

At this moment, spawning the sub-application blocks the execution of the
main application.

This change should make it easier to authenticate through Rare inside
a gamescope session, such as the steam deck.
2024-02-12 21:51:42 +02:00