1
0
Fork 0
mirror of synced 2024-06-02 18:54:41 +12:00
Commit graph

229 commits

Author SHA1 Message Date
loathingKernel ae69413ddb
InstallDialog: Remove inline stylesheet, adjust the font. 2024-02-24 01:51:45 +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 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 17066f9a67 Rare: cherry-pick some of sourcery suggestions 2024-02-12 21:52:07 +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
loathingKernel 69aca3851f InstallDialog: Update widget attribute name 2024-01-21 23:45:38 +02:00
loathingKernel fa9b49c019 SelectiveDialog: Keep the layout of the central widget 2024-01-21 23:45:28 +02:00
loathingKernel 5b36727076 Dialogs: Add subtitle label in ButtonDialog 2024-01-21 23:45:23 +02:00
loathingKernel a605bddffa RareGame: Move sdl_name to RareGameBase
InstallDialog uses that property so RareEosOverlay should have it too.
Also calculate the base_path for the overlay case instead of passing it as
argument
2024-01-19 12:09:57 +02:00
loathingKernel a246f4ee16 EosGroup: Remake the UI and integrate with Rare's facilities
* Uninstalling the Overlay now goes through the same procedure as
uninstalling any other game.

* The available prefixes are now listed instead of hiding them inside
a combo box.

* Each listing works indepedently to enable/disable the Overlay for the prefix
2024-01-19 00:57:16 +02:00
loathingKernel 971c31e8f4 SelectiveWidget: Create specialized widget for selecting optional downloads
Because there are two dialogs for editing optional downloads, refactor
the separate implementations to select them into a common reusable widget
and use it in SelectiveDialog and InstallDialog.
2024-01-18 16:44:47 +02:00
loathingKernel 0fb1526d67 MoveDialog: Refactor MovePopup into a dialog using ActionDialog as base 2024-01-02 23:11:47 +02:00
loathingKernel d3ec79378e UninstallDialog: Refactor to use ButtonDialog as base 2024-01-02 22:31:25 +02:00
loathingKernel 80ac9296fc Rare: cherry-pick some sourcery suggestions 2024-01-02 17:57:02 +02:00
loathingKernel 89c1a4eaf4 Launcher: Refactor cloud sync dialog to use ButtonDialog base class 2024-01-02 17:38:51 +02:00
loathingKernel c7336ad04a InstallDialog: Use ActionDialog base class 2024-01-02 15:12:07 +02:00
loathingKernel e421d02a4f Update SDL dialog 2023-12-26 00:05:11 +02:00
loathingKernel 62e19a8be2 VerifyGame: Present a dialog to select selective downloads in the game
supports them.
2023-12-25 23:56:37 +02:00
loathingKernel 400625975d Dialogs: Re-implement Launch and Login dialogs on top of a few common super-classes
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.
2023-12-24 21:08:26 +02:00
loathingKernel b039f9e06c
LaunchDialog: allow legendary to check for updates in its own way 2023-12-19 11:46:13 +02:00
loathingKernel 5f5e471169
RareGameBase: Add default_platform property
This property reports the default platform to use for a game based
on legendary's configuration and if they platform is available in the
game's assets.

Using that property we can make better choices on what platform to operate
on without user intervention. Currently we use it to infer the platform
in when installing, importing, and calculating game versions.
2023-12-16 14:02:53 +02:00
loathingKernel 6249e56849
InstallDialog: Oooooooof.gif
* Infer the displayed to reflect where the affected directory is
  If base_path is set outside of InstallDialog, display that.
  If the game is already installed, show the installation directory
  If neither of the above is true, use legendary's inference based on
  the default platform if the game supports it. Fallback to Windows.

* Disable irrelevant and potentially harmful options when the game is
  already installed, such as the installation path, the platform selection
  and creating a shortcut.

* Infer the correct platform based on the existing installation. If it
  is not installed, use the default platform if the game supports it and
  fallback to windows.

* Move the horrible lambda used to populate the error box when the
  platform was unsupported into a separate method.
2023-12-16 00:49:51 +02:00
loathingKernel 3ce62facd2
InstallDialog: Properly find the the row when inserting install_dir_edit 2023-12-12 01:23:17 +02:00
loathingKernel 8e1a3c8c73
LoginDialog: Calculate a fixed height for the login stack based on width
* Properly find row to insert sid_edit into
* Use lazy evaluation for logging
* Clean the login forms by using separate layouts for the interactive fields
2023-12-12 01:23:17 +02:00
loathingKernel 0ec80e5678
LoginDialog: Set minimum size in a way that avoids resizing on changing widgets
The forms were updated to be more informative and easier to read.

NOTE: The reason the form is bigger than the contents is because the
QLabels have word-wrapping enabled and as such they substitute width
for height (`hasHeightforWidth`)
2023-12-12 01:23:16 +02:00
loathingKernel 8c83f8aa23
InstallDialog: Add install_dir_edit widget without using an extra layout 2023-12-12 01:23:15 +02:00
loathingKernel 845bc54a90
InstallDialog: Add selective downloads descriptions as tooltips 2023-12-10 14:22:29 +02:00
loathingKernel d1d7e6d2e7
InstallDialog: Code consistency with button slot names 2023-12-10 14:22:29 +02:00
loathingKernel 13eaa459e1
LaunchDialog: accept_close -> reject_close for code consistency 2023-12-10 14:22:29 +02:00
loathingKernel 0ea8d2c0d2
UninstallDialog: Handle Escape key
Handle Escape key to go through the proper cancellation routine.
2023-12-10 14:22:29 +02:00
Stelios Tsampas 7824fa20a8
InstallDialog: Always show prerequisites if they exist
* Do not depend the relevant InstallOptionsModel option to on the running platform
2023-12-10 14:22:27 +02:00
loathingKernel b20be46752
InstallDialog: Offer to install prerequisites on native platforms 2023-12-10 14:22:27 +02:00
loathingKernel 99eaf86507
AccountWidget: Add a Quit button in the widget in case the system tray
is unavailable (for example running in a gamescope session)

* Do not show the launch window while instantiating the application. This
probably was causing numerous issues because it was running outside of
the applications event loop. This also fixes the exit button on the login
dialog requiring `sys.exit()` to quit Rare. Now it goes through the
proper cleanup procedures.

* Make slot and signal names more uniform

* Fix a problem with RareCore connecting RareGames to the same signals
multiple times when the library was refreshed.
2023-12-10 14:21:39 +02:00
loathingKernel a87f34163a
Skip widget updates on spontaneous events.
Spontaneous are events external to the application such as the window
manager showing or hiding the application. We don't want to update on those.
2023-11-29 12:50:39 +02:00
loathingKernel c05209578c
InstallDialog: Fix install dialog not calculating available space
After the PathEdit change that stopped it from emitting the
textChanged signal when instatiated, the available space
calculation wouldn't take place, so do it when the dialog
becomes visible.
2023-11-29 12:47:56 +02:00
loathingKernel 3b0c25e241
Widgets: Move PathInputDialog to rare/widget as a generic option
This widget is currently unused and could be deleted
2023-11-29 12:39:27 +02:00
loathingKernel f2c575e082
InstallDialog: Expose platforms in RareGame and use it
to populate the combobox
2023-11-28 16:38:02 +02:00
loathingKernel 43766c82a4
GameInfo: Enable Modify button only when the game has SDLs
Add icons to the DLC install/uninstall buttons
2023-11-28 16:38:02 +02:00
loathingKernel eb48a506d2
GameInfo: Add 'Modify Game' button to adjust selective downloads 2023-11-28 16:38:00 +02:00
lennard 62aa78dcae Fix release-tests workflow 2023-05-03 12:32:12 +02:00
lennard 263af75853 Do not set available space text twice in install dialog 2023-05-03 12:32:12 +02:00
lennard 075443261d Show free space in install dialog 2023-05-03 12:32:12 +02:00
lennard f1fa0ada1a Open cloud save dialog after playing a game, if no action set on start 2023-04-08 01:03:14 +02:00
lennard 3ec6a45cc3 Add double check for game assets and fix error in cloud save dialog 2023-04-05 13:09:34 +02:00
lennard 3874fac402
Sync saves when game finished 2023-03-18 16:14:01 +01:00
loathingKernel 748ff6d9ed RareCore: Detect if a game in saves is from another account.
And some cleanup
2023-03-18 14:42:46 +01:00
loathingKernel 837b391350
PathEdit: Allow for the completer's root path to be set at runtime.
This allows to complete from relative paths, such use exe override

Fix constructor argument names to follow Qt's types.
Set the same filters as the dialog for the completer.
Use the completer's icon provider for the dialog.

Force Rare to use Qt's file dialog instead of the native one.
2023-03-15 22:49:18 +02:00
loathingKernel 18ebb6888f
InstallDialog: Allow for some special cases to install 0 size downloads
This specifically helps with games that have selectable downloads.
If we import a game with SDLs without any `install_tags` in the config
we will verify against the full game, meaning that files missing will
cause the verification to fail despite the game being correct. Since the
game is correct, resolving the download will result in a 0 size update.
This change will allow the InstallDialog to finish through the Install
button successfully despite having nothing to install.

On the `lgndr` side things are more complicated. Due to minor oversights
in legendary, the `install_tags` in the above example wouldn't be written
to the configuration file, causing a verification loop because the file
list wouldn't be filtered. To fix that, we also save legendary's config
file at the end of cleaning after a 0 size download.
2023-03-14 12:18:19 +02:00