浏览代码

UI: Use Qt dialogs for Font & Color Pickers on Linux

This fixes a hang on Ubuntu when closing the
dialogs after leaving them open for a time.
Matt Gajownik 5 年之前
父节点
当前提交
a9a19cf351
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      UI/properties-view.cpp
  2. 1 1
      UI/window-basic-main.cpp

+ 2 - 2
UI/properties-view.cpp

@@ -1694,7 +1694,7 @@ bool WidgetInfo::ColorChanged(const char *setting)
 	 * other open QDialogs on exit, and
 	 * https://bugreports.qt-project.org/browse/QTBUG-34532
 	 */
-#ifdef __APPLE__
+#ifndef _WIN32
 	options |= QColorDialog::DontUseNativeDialog;
 #endif
 
@@ -1728,7 +1728,7 @@ bool WidgetInfo::FontChanged(const char *setting)
 
 	QFontDialog::FontDialogOptions options;
 
-#ifdef __APPLE__
+#ifndef _WIN32
 	options = QFontDialog::DontUseNativeDialog;
 #endif
 

+ 1 - 1
UI/window-basic-main.cpp

@@ -7482,7 +7482,7 @@ void OBSBasic::ColorChange()
 				obs_data_get_string(curPrivData, "color");
 			const char *customColor = *oldColor != 0 ? oldColor
 								 : "#55FF0000";
-#ifdef __APPLE__
+#ifndef _WIN32
 			options |= QColorDialog::DontUseNativeDialog;
 #endif