forked from openkylin/ukui-search
Merge pull request #201 from mammonsama666/0416-dev
Add default value for font-size & style-name.
This commit is contained in:
commit
675e595bad
|
@ -71,6 +71,8 @@ GlobalSettings::GlobalSettings(QObject *parent) : QObject(parent)
|
|||
m_cache.insert(TRANSPARENCY_KEY, m_trans_gsettings->get(TRANSPARENCY_KEY).toDouble());
|
||||
}
|
||||
|
||||
m_cache.insert(STYLE_NAME_KEY, "ukui-light");
|
||||
m_cache.insert(FONT_SIZE_KEY, 11);
|
||||
if (QGSettings::isSchemaInstalled(THEME_GSETTINGS_ID)) {
|
||||
m_theme_gsettings = new QGSettings(THEME_GSETTINGS_ID, QByteArray(), this);
|
||||
connect(m_theme_gsettings, &QGSettings::changed, this, [=](const QString& key) {
|
||||
|
|
|
@ -39,7 +39,6 @@ SearchListView::SearchListView(QWidget * parent, const QStringList& list, const
|
|||
this->setHeaderHidden(true);
|
||||
this->setColumnWidth(0, 20);
|
||||
this->setColumnWidth(1, 80);
|
||||
rowheight = this->rowHeight(this->model()->index(0, 0, QModelIndex())) + 1;
|
||||
this->setFixedHeight(list.count() * rowheight + 4);
|
||||
this->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
this->setAutoFillBackground(false);
|
||||
|
|
|
@ -1,3 +1,24 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (C) 2020, KylinSoft Co., Ltd.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: zhangjiaping <zhangjiaping@kylinos.cn>
|
||||
*
|
||||
*/
|
||||
|
||||
#include "custom-style.h"
|
||||
|
||||
CustomStyle::CustomStyle(const QString &proxyStyleName, QObject *parent) : QProxyStyle(proxyStyleName)
|
||||
|
|
|
@ -1,3 +1,24 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (C) 2020, KylinSoft Co., Ltd.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: zhangjiaping <zhangjiaping@kylinos.cn>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CUSTOMSTYLE_H
|
||||
#define CUSTOMSTYLE_H
|
||||
#include <QProxyStyle>
|
||||
|
|
Loading…
Reference in New Issue