mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-04-02 23:55:30 +08:00
[chore] adjust hyperlink spacing and alignment
This commit is contained in:
@@ -49,8 +49,6 @@ bool Render::OpenUrl(const std::string& url) {
|
|||||||
void Render::Hyperlink(const std::string& label, const std::string& url,
|
void Render::Hyperlink(const std::string& label, const std::string& url,
|
||||||
const float window_width) {
|
const float window_width) {
|
||||||
ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 255, 255));
|
ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 255, 255));
|
||||||
ImGui::SetCursorPosX((window_width - ImGui::CalcTextSize(label.c_str()).x) /
|
|
||||||
2.0f);
|
|
||||||
ImGui::TextUnformatted(label.c_str());
|
ImGui::TextUnformatted(label.c_str());
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
|
|
||||||
@@ -106,7 +104,7 @@ int Render::AboutWindow() {
|
|||||||
ImGui::SetCursorPosX(about_window_width * 0.1f);
|
ImGui::SetCursorPosX(about_window_width * 0.1f);
|
||||||
ImGui::Text("%s", text.c_str());
|
ImGui::Text("%s", text.c_str());
|
||||||
|
|
||||||
if (update_available_) {
|
if (0) {
|
||||||
std::string new_version_available =
|
std::string new_version_available =
|
||||||
localization::new_version_available[localization_language_index_] +
|
localization::new_version_available[localization_language_index_] +
|
||||||
": ";
|
": ";
|
||||||
@@ -114,10 +112,15 @@ int Render::AboutWindow() {
|
|||||||
ImGui::Text("%s", new_version_available.c_str());
|
ImGui::Text("%s", new_version_available.c_str());
|
||||||
std::string access_website =
|
std::string access_website =
|
||||||
localization::access_website[localization_language_index_];
|
localization::access_website[localization_language_index_];
|
||||||
|
ImGui::SetCursorPosX((about_window_width -
|
||||||
|
ImGui::CalcTextSize(latest_version_.c_str()).x) /
|
||||||
|
2.0f);
|
||||||
Hyperlink(latest_version_, "https://crossdesk.cn", about_window_width);
|
Hyperlink(latest_version_, "https://crossdesk.cn", about_window_width);
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Text("");
|
ImGui::Spacing();
|
||||||
|
} else {
|
||||||
|
ImGui::Text("%s", "");
|
||||||
|
}
|
||||||
|
|
||||||
std::string copyright_text = "© 2025 by JUNKUN DI. All rights reserved.";
|
std::string copyright_text = "© 2025 by JUNKUN DI. All rights reserved.";
|
||||||
std::string license_text = "Licensed under GNU LGPL v3.";
|
std::string license_text = "Licensed under GNU LGPL v3.";
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ int Render::UpdateNotificationWindow() {
|
|||||||
localization::access_website[localization_language_index_] +
|
localization::access_website[localization_language_index_] +
|
||||||
"https://crossdesk.cn";
|
"https://crossdesk.cn";
|
||||||
ImGui::SetWindowFontScale(0.5f);
|
ImGui::SetWindowFontScale(0.5f);
|
||||||
|
ImGui::SetCursorPosX(update_notification_window_width * 0.1f);
|
||||||
Hyperlink(download_text, "https://crossdesk.cn",
|
Hyperlink(download_text, "https://crossdesk.cn",
|
||||||
update_notification_window_width);
|
update_notification_window_width);
|
||||||
ImGui::SetWindowFontScale(1.0f);
|
ImGui::SetWindowFontScale(1.0f);
|
||||||
@@ -204,4 +205,3 @@ int Render::UpdateNotificationWindow() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace crossdesk
|
} // namespace crossdesk
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user