Unify wiki & video guide buttons (#16159)

* init

* fix build

* Update PrintOptionsDialog.cpp

* Update TroubleshootDialog.cpp
This commit is contained in:
yw4z
2026-10-09 12:13:00 +08:00
committed by GitHub
parent 018c4f49ee
commit 25ec403156
28 changed files with 381 additions and 141 deletions
+9 -3
View File
@@ -40,6 +40,7 @@
#include <wx/textctrl.h>
#include <wx/settings.h>
#include <wx/tokenzr.h>
#include <wx/utils.h>
#include <wx/variant.h>
#include <wx/window.h>
#include <wx/toplevel.h>
@@ -62,7 +63,6 @@
#include "PresetComboBoxes.hpp"
#include "Widgets/CheckBox.hpp"
#include "Widgets/DialogButtons.hpp"
#include "Widgets/HyperLink.hpp"
#ifdef __linux__
#define wxLinux true
@@ -1011,8 +1011,14 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection *dependent_
checkbox_sizer->Show(bool(m_buttons & REMEMBER_CHOISE));
if (dependent_presets != nullptr) {
auto wiki = new HyperLink(this, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/transfer_discard_changes");
m_sizer_button->Add(wiki, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, FromDIP(22));
auto wiki_btn = new Button(this, "", "toolbar_wiki", 0, 15);
auto wiki_url = "https://www.orcaslicer.com/wiki/transfer_discard_changes";
wiki_btn->SetToolTip(_L("Wiki Guide") + "\n" + wiki_url);
wiki_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
wiki_btn->SetCanFocus(false);
wiki_btn->Bind(wxEVT_LEFT_DOWN, ([wiki_url](auto& e) {wxLaunchDefaultBrowser(wiki_url);}));
m_sizer_button->Add(wiki_btn, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, FromDIP(22));
}
m_sizer_button->Add(0, 0, 1, 0, 0);