[gnome-subtitles/gtk3] Fixing bug with UI elements in video area
- From: Pedro Daniel da Rocha Melo e Castro <pcastro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-subtitles/gtk3] Fixing bug with UI elements in video area
- Date: Sat, 12 May 2018 13:29:38 +0000 (UTC)
commit 233b93b582b231316a47b9e454387a6901e90ab3
Author: Pedro Castro <pedro gnomesubtitles org>
Date: Fri May 11 22:11:45 2018 +0100
Fixing bug with UI elements in video area
src/GnomeSubtitles/Ui/VideoPreview/Player.cs | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/src/GnomeSubtitles/Ui/VideoPreview/Player.cs b/src/GnomeSubtitles/Ui/VideoPreview/Player.cs
index a61d1a6..35a0dee 100644
--- a/src/GnomeSubtitles/Ui/VideoPreview/Player.cs
+++ b/src/GnomeSubtitles/Ui/VideoPreview/Player.cs
@@ -1,6 +1,6 @@
/*
* This file is part of Gnome Subtitles.
- * Copyright (C) 2007-2017 Pedro Castro
+ * Copyright (C) 2007-2018 Pedro Castro
*
* Gnome Subtitles is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -183,12 +183,16 @@ public class Player {
private void InitializeSocket () {
socket = new Socket();
-// RGBA black = new RGBA();
-// black.Red = 0;
-// black.Green = 0;
-// black.Blue = 0;
-// black.Alpha = 1;
-// socket.OverrideBackgroundColor(StateFlags.Normal, black);
+ /* Set the socket background color. If we don't do this, the socket/video
+ * area will show a copy of the UI elements (menu, labels, other
+ * components) when the video isn't loaded.
+ */
+ RGBA black = new RGBA();
+ black.Red = 0;
+ black.Green = 0;
+ black.Blue = 0;
+ black.Alpha = 1;
+ socket.OverrideBackgroundColor(StateFlags.Normal, black);
frame.Child = socket;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]