Skip to content
Snippets Groups Projects
Commit 1a406f79 authored by Jedi18's avatar Jedi18
Browse files

replaced with togglebutton using qtquickcontrols2

parent 4996ae27
No related branches found
No related tags found
No related merge requests found
Pipeline #625 failed
import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import QtQuick 2.12
import QtQuick.Controls 2.12
import im.nheko 1.0
Switch {
style: SwitchStyle {
handle: Rectangle {
width: 20
height: 20
radius: 90
color: "whitesmoke"
id: toggleButton
indicator: Item {
implicitWidth: 48
implicitHeight: 26
Rectangle {
height: parent.height/2
radius: height/2
width: parent.width - height
x: radius
y: parent.height / 2 - height / 2
color: toggleButton.checked ? "skyblue" : "grey"
border.color: "#cccccc"
}
groove: Rectangle {
implicitWidth: 40
implicitHeight: 20
radius: 90
color: checked ? "skyblue" : "grey"
Rectangle {
x: toggleButton.checked ? parent.width - width : 0
width: parent.height
height: width
radius: width/2
color: toggleButton.down ? "whitesmoke" : "whitesmoke"
border.color: "#999999"
}
}
}
\ No newline at end of file
......@@ -54,7 +54,6 @@ class LeaveRoom;
class Logout;
class MemberList;
class ReCaptcha;
class RoomSettingsOld;
}
class MainWindow : public QMainWindow
......
......@@ -11,8 +11,8 @@
#include "CacheCryptoStructs.h"
#include "EventStore.h"
#include "InputBar.h"
#include "ui/UserProfile.h"
#include "ui/RoomSettings.h"
#include "ui/UserProfile.h"
namespace mtx::http {
using RequestErr = const std::optional<mtx::http::ClientError> &;
......
#include "RoomSettings.h"
#include <QApplication>
#include <QFileDialog>
#include <QHBoxLayout>
#include <QImageReader>
#include <QMimeDatabase>
#include <QStandardPaths>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QApplication>
#include <mtx/responses/common.hpp>
#include <mtx/responses/media.hpp>
#include "Cache.h"
#include "Logging.h"
#include "Config.h"
#include "Logging.h"
#include "MatrixClient.h"
#include "ui/TextField.h"
#include "Utils.h"
#include "ui/TextField.h"
using namespace mtx::events;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment