cleanup
This commit is contained in:
@@ -41,8 +41,6 @@ class ApplicationSettings {
|
||||
public:
|
||||
bool docked = false;
|
||||
bool showDisabledDevices = false;
|
||||
bool fitWindowHeight = true;
|
||||
bool minimizeToTray = true;
|
||||
};
|
||||
|
||||
class ApplicationData {
|
||||
|
||||
@@ -117,7 +117,7 @@ void init(DrawData& drawData, ApplicationData& appData)
|
||||
|
||||
// Set window minimize behavior
|
||||
glfwSetWindowIconifyCallback(drawData.window, [](GLFWwindow* window, int isIconified) {
|
||||
if (isIconified && hackyAppData->settings.minimizeToTray)
|
||||
if (isIconified && hackyAppData->settings.docked)
|
||||
{
|
||||
glfwHideWindow(window);
|
||||
}
|
||||
@@ -191,10 +191,7 @@ void draw(DrawData& drawData, ApplicationData& appData)
|
||||
customYCursor += audioDeviceWindow(appData, appData.audioData->recordingDevices, " \xEE\xBD\x8F Recording").y;
|
||||
|
||||
// Resize viewport
|
||||
if (appData.settings.fitWindowHeight)
|
||||
{
|
||||
drawData.window_size.y = customYCursor;
|
||||
}
|
||||
drawData.window_size.y = customYCursor;
|
||||
|
||||
if (appData.settings.docked)
|
||||
{
|
||||
@@ -231,8 +228,6 @@ ImVec2 menuBar(DrawData& drawData, ApplicationData& appData)
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Show Disabled Devices", &appData.settings.showDisabledDevices);
|
||||
ImGui::Checkbox("Fit Window Height", &appData.settings.fitWindowHeight);
|
||||
ImGui::Checkbox("Minimize To Tray", &appData.settings.minimizeToTray);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
|
||||
@@ -360,6 +360,7 @@ int startImgui(ImGuiCallbacks& callbacks, const char* title, int windowWidth, in
|
||||
return 1;
|
||||
|
||||
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
|
||||
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
|
||||
GLFWwindow* window = glfwCreateWindow(windowWidth, windowHeight, title, NULL, NULL);
|
||||
|
||||
// Setup Vulkan
|
||||
@@ -438,6 +439,7 @@ int startImgui(ImGuiCallbacks& callbacks, const char* title, int windowWidth, in
|
||||
{
|
||||
callbacks.initFunc(drawData);
|
||||
}
|
||||
glfwShowWindow(window);
|
||||
|
||||
// Upload Fonts
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user