mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-04-12 13:34:05 +08:00
[feat] disable and style minimize_to_tray checkbox for non-Windows platforms
This commit is contained in:
@@ -205,11 +205,10 @@ static std::vector<std::string> browse = {
|
|||||||
reinterpret_cast<const char*>(u8"浏览"), "Browse"};
|
reinterpret_cast<const char*>(u8"浏览"), "Browse"};
|
||||||
static std::vector<std::string> default_desktop = {
|
static std::vector<std::string> default_desktop = {
|
||||||
reinterpret_cast<const char*>(u8"桌面"), "Desktop"};
|
reinterpret_cast<const char*>(u8"桌面"), "Desktop"};
|
||||||
|
|
||||||
#if _WIN32
|
|
||||||
static std::vector<std::string> minimize_to_tray = {
|
static std::vector<std::string> minimize_to_tray = {
|
||||||
reinterpret_cast<const char*>(u8"退出时最小化到系统托盘:"),
|
reinterpret_cast<const char*>(u8"退出时最小化到系统托盘:"),
|
||||||
"Minimize to system tray when exit:"};
|
"Minimize to system tray when exit:"};
|
||||||
|
#if _WIN32
|
||||||
static std::vector<LPCWSTR> exit_program = {L"退出", L"Exit"};
|
static std::vector<LPCWSTR> exit_program = {L"退出", L"Exit"};
|
||||||
#endif
|
#endif
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|||||||
@@ -331,10 +331,14 @@ int Render::SettingWindow() {
|
|||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if _WIN32
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
{
|
{
|
||||||
|
#ifndef _WIN32
|
||||||
|
ImGui::BeginDisabled();
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
|
||||||
|
#endif
|
||||||
settings_items_offset += settings_items_padding;
|
settings_items_offset += settings_items_padding;
|
||||||
ImGui::SetCursorPosY(settings_items_offset);
|
ImGui::SetCursorPosY(settings_items_offset);
|
||||||
ImGui::AlignTextToFramePadding();
|
ImGui::AlignTextToFramePadding();
|
||||||
@@ -350,8 +354,11 @@ int Render::SettingWindow() {
|
|||||||
|
|
||||||
ImGui::Checkbox("##enable_minimize_to_tray_",
|
ImGui::Checkbox("##enable_minimize_to_tray_",
|
||||||
&enable_minimize_to_tray_);
|
&enable_minimize_to_tray_);
|
||||||
}
|
#ifndef _WIN32
|
||||||
|
ImGui::PopStyleColor();
|
||||||
|
ImGui::EndDisabled();
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user