Skip to content

Commit

Permalink
Merge pull request #1269 from heropj/fix/scrollable-settings
Browse files Browse the repository at this point in the history
fix: Make settings tab scrollable for better accessibility on small screens
  • Loading branch information
kelson42 authored Dec 11, 2024
2 parents c686753 + 5e1ad11 commit 95779cc
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/settingsview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <QMessageBox>
#include <QFileDialog>
#include <QToolTip>
#include <QScrollArea>

namespace
{
Expand All @@ -29,7 +30,7 @@ namespace
}

SettingsView::SettingsView(QWidget *parent)
: QWidget(parent)
: QScrollArea(parent)
, ui(new Ui::Settings)
{
SettingsManager *settingsMgr = KiwixApp::instance()->getSettingsManager();
Expand Down
3 changes: 2 additions & 1 deletion src/settingsview.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

#include <QWidget>
#include <QPushButton>
#include <QScrollArea>
namespace Ui {
class Settings;
}
class SettingsView : public QWidget
class SettingsView : public QScrollArea
{
Q_OBJECT
public:
Expand Down
32 changes: 31 additions & 1 deletion ui/settings.ui
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Settings</class>
<widget class="QScrollArea" name="scrollArea">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1029</width>
<height>580</height>
</rect>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1029</width>
<height>580</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<item>
<widget class="QWidget" name="Settings">
<property name="geometry">
<rect>
Expand All @@ -19,7 +45,7 @@
<property name="minimumSize">
<size>
<width>600</width>
<height>0</height>
<height>450</height>
</size>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -406,6 +432,10 @@
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>

0 comments on commit 95779cc

Please sign in to comment.