mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
Enable movement of settings window
This commit is contained in:
@@ -522,23 +522,13 @@ int MainWindow::Run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (settings_button_pressed_) {
|
if (settings_button_pressed_) {
|
||||||
const ImGuiViewport *viewport = ImGui::GetMainViewport();
|
|
||||||
|
|
||||||
ImGui::SetNextWindowPos(
|
|
||||||
ImVec2((viewport->WorkSize.x - viewport->WorkPos.x -
|
|
||||||
localization::settings_window_width
|
|
||||||
[localization_language_index_]) /
|
|
||||||
2,
|
|
||||||
(viewport->WorkSize.y - viewport->WorkPos.y - 190) / 2));
|
|
||||||
ImGui::SetNextWindowSize(ImVec2(
|
ImGui::SetNextWindowSize(ImVec2(
|
||||||
localization::settings_window_width[localization_language_index_],
|
localization::settings_window_width[localization_language_index_],
|
||||||
190));
|
190));
|
||||||
|
|
||||||
ImGui::Begin(
|
ImGui::Begin(
|
||||||
localization::settings[localization_language_index_].c_str(),
|
localization::settings[localization_language_index_].c_str(),
|
||||||
nullptr,
|
nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse);
|
||||||
ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse |
|
|
||||||
ImGuiWindowFlags_NoMove);
|
|
||||||
|
|
||||||
{
|
{
|
||||||
const char *language_items[] = {
|
const char *language_items[] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user