Improve name selection area UI

This commit is contained in:
reionwong 2021-09-14 20:25:01 +08:00
parent ff1c006041
commit b8d2a0ef49
2 changed files with 8 additions and 5 deletions

View file

@ -19,6 +19,7 @@
#include "mimeappmanager.h"
#include <QStandardPaths>
#include <QDirIterator>
#include <QUrl>
#include <QDir>
@ -71,7 +72,9 @@ QStringList MimeAppManager::desktopPaths()
QString MimeAppManager::mimeAppsListFilePath()
{
return QString("%1/.config/mimeapps.list").arg(QDir::homePath());
// return QString("%1/.config/mimeapps.list").arg(QDir::homePath());
return QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QLatin1String("/mimeapps.list");
}
void MimeAppManager::initApplications()
@ -328,7 +331,7 @@ bool MimeAppManager::setDefaultAppForFile(const QString &filePath, const QString
if (!settings.isWritable())
return false;
settings.beginGroup("Default Applications"); // Added Associations
settings.beginGroup(QStringLiteral("Default Applications")); // Added Associations
settings.setValue(mimeType.name(), value);
settings.sync();

View file

@ -206,10 +206,10 @@ Item {
Rectangle {
z: 1
x: _label.x
x: _label.x + (_label.width - _label.paintedWidth) / 2 - (FishUI.Units.smallSpacing / 2)
y: _label.y
width: _label.width
height: _label.height
width: _label.paintedWidth + FishUI.Units.smallSpacing
height: _label.paintedHeight
radius: 4
color: FishUI.Theme.highlightColor
opacity: control.selected ? 1.0 : 0