1
0
mirror of https://github.com/dolphin-emu/dolphin synced 2024-06-28 22:46:42 +00:00

Compare commits

...

6 Commits

Author SHA1 Message Date
Tilka
b11d6afbad
Merge 7eab58d0cd into 10a95a4d5b 2024-06-26 02:53:35 +01:00
OatmealDome
10a95a4d5b
Merge pull request #12890 from OatmealDome/release-stuff
Miscellaneous release string updates
2024-06-25 01:25:08 -04:00
OatmealDome
04b0ceedcd Android: Update copyright year in About dialog to 2024 2024-06-24 15:08:12 -04:00
OatmealDome
9c432e960b AboutDialog: Update copyright year to 2024 2024-06-24 15:06:54 -04:00
OatmealDome
f8f117e599 GeneralPane: Update "Beta" auto update track to "Releases" 2024-06-24 15:06:37 -04:00
Tillmann Karras
7eab58d0cd DolphinQt: avoid scrolling while game list is being modified 2024-06-23 03:12:12 +01:00
8 changed files with 70 additions and 3 deletions

View File

@ -874,7 +874,7 @@ It can efficiently compress both junk data and encrypted Wii data.
<string name="about_website"><a href="https://dolphin-emu.org/">Website</a></string>
<string name="about_github"><a href="https://github.com/dolphin-emu/dolphin">GitHub</a></string>
<string name="about_support"><a href="https://forums.dolphin-emu.org/">Support</a></string>
<string name="about_copyright_warning">\u00A9 20032015+ Dolphin Team. \u201cGameCube\u201d and \u201cWii\u201d are trademarks of Nintendo. Dolphin is not affiliated with Nintendo in any way.</string>
<string name="about_copyright_warning">\u00A9 20032024+ Dolphin Team. \u201cGameCube\u201d and \u201cWii\u201d are trademarks of Nintendo. Dolphin is not affiliated with Nintendo in any way.</string>
<string name="system_driver">System driver</string>
<string name="system_driver_desc">The GPU driver that is part of the OS.</string>

View File

@ -89,7 +89,7 @@ AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent)
// in your translation, please use the type of curly quotes that's appropriate for
// your language. If you aren't sure which type is appropriate, see
// https://en.wikipedia.org/wiki/Quotation_mark#Specific_language_features
tr("\u00A9 2003-2015+ Dolphin Team. \u201cGameCube\u201d and \u201cWii\u201d are "
tr("\u00A9 2003-2024+ Dolphin Team. \u201cGameCube\u201d and \u201cWii\u201d are "
"trademarks of Nintendo. Dolphin is not affiliated with Nintendo in any way.")));
QLabel* logo = new QLabel();

View File

@ -320,6 +320,8 @@ add_executable(dolphin-emu
QtUtils/SignalBlocking.h
QtUtils/UTF8CodePointCountValidator.cpp
QtUtils/UTF8CodePointCountValidator.h
QtUtils/ViewportLock.cpp
QtUtils/ViewportLock.h
QtUtils/WindowActivationEventFilter.cpp
QtUtils/WindowActivationEventFilter.h
QtUtils/WrapInScrollArea.cpp

View File

@ -67,6 +67,7 @@
#include "DolphinQt/QtUtils/ModalMessageBox.h"
#include "DolphinQt/QtUtils/ParallelProgressDialog.h"
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
#include "DolphinQt/QtUtils/ViewportLock.h"
#include "DolphinQt/Resources.h"
#include "DolphinQt/Settings.h"
#include "DolphinQt/WiiUpdate.h"
@ -116,6 +117,8 @@ GameList::GameList(QWidget* parent) : QStackedWidget(parent), m_model(this)
connect(&m_model, &QAbstractItemModel::rowsInserted, this, &GameList::ConsiderViewChange);
connect(&m_model, &QAbstractItemModel::rowsRemoved, this, &GameList::ConsiderViewChange);
m_viewportLock = new ViewportLock(this, m_list_proxy, m_list);
addWidget(m_list);
addWidget(m_grid);
addWidget(m_empty);

View File

@ -20,6 +20,8 @@ namespace UICommon
class GameFile;
}
class ViewportLock;
class GameList final : public QStackedWidget
{
Q_OBJECT
@ -100,6 +102,7 @@ private:
void UpdateFont();
GameListModel m_model;
ViewportLock* m_viewportLock;
QSortFilterProxyModel* m_list_proxy;
QSortFilterProxyModel* m_grid_proxy;

View File

@ -0,0 +1,34 @@
// Copyright 2024 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <QAbstractItemModel>
#include <QAbstractItemView>
#include "DolphinQt/QtUtils/ViewportLock.h"
ViewportLock::ViewportLock(QObject* parent, QAbstractItemModel* model, QAbstractItemView* view)
: QObject(parent), m_view(view)
{
connect(model, &QAbstractItemModel::rowsAboutToBeInserted, this,
&ViewportLock::AboutToBeModified);
connect(model, &QAbstractItemModel::rowsAboutToBeRemoved, this, &ViewportLock::AboutToBeModified);
connect(model, &QAbstractItemModel::rowsInserted, this, &ViewportLock::Modified);
connect(model, &QAbstractItemModel::rowsRemoved, this, &ViewportLock::Modified);
}
void ViewportLock::AboutToBeModified()
{
QSize size = m_view->size();
m_first = m_view->indexAt(QPoint(0, 0));
m_last = m_view->indexAt(QPoint(size.height(), size.width()));
}
void ViewportLock::Modified()
{
// Try to keep the first row at the top.
// If that fails, try to keep the last row at the bottom.
if (m_first.isValid())
m_view->scrollTo(m_first, QAbstractItemView::PositionAtTop);
else if (m_last.isValid())
m_view->scrollTo(m_last, QAbstractItemView::PositionAtBottom);
}

View File

@ -0,0 +1,25 @@
// Copyright 2024 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <QObject>
#include <QPersistentModelIndex>
class QAbstractItemModel;
class QAbstractItemView;
// Try to keep visible items in view while items are added/removed.
class ViewportLock : public QObject
{
Q_OBJECT
public:
ViewportLock(QObject* parent, QAbstractItemModel* model, QAbstractItemView* view);
void AboutToBeModified();
void Modified();
private:
QAbstractItemView* m_view;
QPersistentModelIndex m_first, m_last;
};

View File

@ -194,7 +194,7 @@ void GeneralPane::CreateAutoUpdate()
auto_update_group_layout->addRow(tr("&Auto Update:"), m_combobox_update_track);
for (const QString& option :
{tr("Don't Update"), tr("Beta (once a month)"), tr("Dev (multiple times a day)")})
{tr("Don't Update"), tr("Releases (every few months)"), tr("Dev (multiple times a day)")})
m_combobox_update_track->addItem(option);
}