mirror of
https://github.com/rock88/moonlight-nx
synced 2025-02-01 13:23:28 +00:00
Move log viewer to settings
This commit is contained in:
parent
21db9087ce
commit
ead42c5b58
2 changed files with 8 additions and 5 deletions
|
@ -6,7 +6,6 @@
|
||||||
#include "LoadingOverlay.hpp"
|
#include "LoadingOverlay.hpp"
|
||||||
#include "AppListWindow.hpp"
|
#include "AppListWindow.hpp"
|
||||||
#include "SettingsWindow.hpp"
|
#include "SettingsWindow.hpp"
|
||||||
#include "LogsWindow.hpp"
|
|
||||||
#include "Settings.hpp"
|
#include "Settings.hpp"
|
||||||
#include "InputSettingsWindow.hpp"
|
#include "InputSettingsWindow.hpp"
|
||||||
#include "nanovg.h"
|
#include "nanovg.h"
|
||||||
|
@ -25,9 +24,6 @@ MainWindow::MainWindow(Widget *parent): ContentWindow(parent, "Moonlight") {
|
||||||
set_right_title_button(FA_COG, [this] {
|
set_right_title_button(FA_COG, [this] {
|
||||||
push<SettingsWindow>();
|
push<SettingsWindow>();
|
||||||
});
|
});
|
||||||
set_right_title_button(FA_FILE_ALT, [this] {
|
|
||||||
push<LogsWindow>();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::window_appear() {
|
void MainWindow::window_appear() {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "SettingsWindow.hpp"
|
#include "SettingsWindow.hpp"
|
||||||
#include "Settings.hpp"
|
#include "Settings.hpp"
|
||||||
|
#include "LogsWindow.hpp"
|
||||||
|
|
||||||
using namespace nanogui;
|
using namespace nanogui;
|
||||||
|
|
||||||
|
@ -115,7 +116,7 @@ SettingsWindow::SettingsWindow(nanogui::Widget* parent): ContentWindow(parent, "
|
||||||
|
|
||||||
auto right_container = container()->add<Widget>();
|
auto right_container = container()->add<Widget>();
|
||||||
right_container->set_layout(new GroupLayout(30, 10, 30, 10));
|
right_container->set_layout(new GroupLayout(30, 10, 30, 10));
|
||||||
right_container->set_fixed_width(580);
|
right_container->set_fixed_width(container_width + 90);
|
||||||
|
|
||||||
right_container->add<Label>("Decoder Threads");
|
right_container->add<Label>("Decoder Threads");
|
||||||
std::vector<std::string> decoder_threads = { "0 (No use threads)", "2", "3", "4" };
|
std::vector<std::string> decoder_threads = { "0 (No use threads)", "2", "3", "4" };
|
||||||
|
@ -159,6 +160,12 @@ SettingsWindow::SettingsWindow(nanogui::Widget* parent): ContentWindow(parent, "
|
||||||
write_log->set_callback([](auto value) {
|
write_log->set_callback([](auto value) {
|
||||||
Settings::settings()->set_write_log(value);
|
Settings::settings()->set_write_log(value);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
auto log_button = right_container->add<Button>("Show logs");
|
||||||
|
log_button->set_fixed_width(component_width);
|
||||||
|
log_button->set_callback([this] {
|
||||||
|
push<LogsWindow>();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsWindow::window_disappear() {
|
void SettingsWindow::window_disappear() {
|
||||||
|
|
Loading…
Reference in a new issue