Warning, /network/neochat/src/qml/ColorScheme.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-FileCopyrightText: 2020 Carl Schwan <carlschwan@kde.org>
0002 // SPDX-License-Identifier: LGPL-2.0-or-later
0003 
0004 import QtQuick
0005 import QtQuick.Layouts
0006 
0007 import org.kde.kirigamiaddons.formcard as FormCard
0008 
0009 import org.kde.neochat
0010 import org.kde.neochat.config
0011 
0012 FormCard.FormComboBoxDelegate {
0013     id: root
0014 
0015     text: i18n("Color theme")
0016     textRole: "display"
0017     valueRole: "display"
0018     model: ColorSchemer.model
0019     Component.onCompleted: currentIndex = ColorSchemer.indexForScheme(Config.colorScheme)
0020     onCurrentValueChanged: {
0021         ColorSchemer.apply(currentIndex);
0022         Config.colorScheme = ColorSchemer.nameForIndex(currentIndex);
0023         Config.save();
0024     }
0025 }