From 7d98bb37c8d72c9a4b44b19c7b521b0dc00fbec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Fri, 4 Oct 2019 09:45:41 +0200 Subject: [PATCH] Adjust live logs buttons with flexbox --- data/debug-interface/styles.css | 34 +++++++++++++++++----------- libnymea-core/debugserverhandler.cpp | 3 +++ 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/data/debug-interface/styles.css b/data/debug-interface/styles.css index 60b1be55..fadcfbb3 100644 --- a/data/debug-interface/styles.css +++ b/data/debug-interface/styles.css @@ -227,41 +227,49 @@ button::-moz-focus-inner { border: 0; } } .log-buttons { - width: 100%; - float: left; + display: -webkit-flex; /* Safari */ + display: flex; + flex-flow: row nowrap; } .log-buttons button { - float: left; + display: -webkit-flex; /* Safari */ + display: flex; + margin: 10px; + width: auto; +} + +.tool-image { + width: 30px; + height: 30px; } #toggleLogsButton { - width: 80%; - margin-right: 10px; + flex-grow: 1; + justify-content: center; + align-items: center; } #copyLogsButton { width: 20px; - margin-left: 10px; - margin-right: 10px; -} - -.tool-image { - width: 25px; - height: 25px; + justify-content: center; + align-items: center; } #clearLogsButton { width: 20px; - margin-left: 10px; + justify-content: center; + align-items: center; } /* Clear floats (clearfix hack) */ +/* .log-buttons:after { content: ""; clear: both; display: table; } +*/ .container { min-height: 100%; diff --git a/libnymea-core/debugserverhandler.cpp b/libnymea-core/debugserverhandler.cpp index 06f15816..476dfc22 100644 --- a/libnymea-core/debugserverhandler.cpp +++ b/libnymea-core/debugserverhandler.cpp @@ -565,6 +565,9 @@ void DebugServerHandler::onWebsocketClientConnected() s_oldLogMessageHandler = qInstallMessageHandler(&logMessageHandler); } + // Enable the log categories depending on the current debug configuration + + s_websocketClients.append(client); qCDebug(dcDebugServer()) << "New websocket client connected:" << client->peerAddress().toString();