Merge branch 'overlay_image' into for_webui
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import copy
|
||||||
import gc
|
import gc
|
||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
from os import makedirs as os_makedirs
|
from os import makedirs as os_makedirs
|
||||||
@@ -81,12 +82,12 @@ class Model:
|
|||||||
self.previous_receive_message = ""
|
self.previous_receive_message = ""
|
||||||
self.translator = Translator()
|
self.translator = Translator()
|
||||||
self.keyword_processor = KeywordProcessor()
|
self.keyword_processor = KeywordProcessor()
|
||||||
self.overlay = Overlay(
|
overlay_settings = {
|
||||||
{
|
"small": config.OVERLAY_SMALL_LOG_SETTINGS,
|
||||||
"small": config.OVERLAY_SMALL_LOG_SETTINGS,
|
"large": config.OVERLAY_LARGE_LOG_SETTINGS,
|
||||||
"large": config.OVERLAY_LARGE_LOG_SETTINGS,
|
}
|
||||||
}
|
overlay_settings["large"]["ui_scaling"] = copy.copy(config.OVERLAY_LARGE_LOG_SETTINGS["ui_scaling"]*0.25)
|
||||||
)
|
self.overlay = Overlay(overlay_settings)
|
||||||
self.overlay_image = OverlayImage()
|
self.overlay_image = OverlayImage()
|
||||||
self.mic_audio_queue = None
|
self.mic_audio_queue = None
|
||||||
self.mic_mute_status = None
|
self.mic_mute_status = None
|
||||||
@@ -746,7 +747,7 @@ class Model:
|
|||||||
self.overlay.updateDisplayDuration(config.OVERLAY_LARGE_LOG_SETTINGS["display_duration"], size)
|
self.overlay.updateDisplayDuration(config.OVERLAY_LARGE_LOG_SETTINGS["display_duration"], size)
|
||||||
self.overlay.updateFadeoutDuration(config.OVERLAY_LARGE_LOG_SETTINGS["fadeout_duration"], size)
|
self.overlay.updateFadeoutDuration(config.OVERLAY_LARGE_LOG_SETTINGS["fadeout_duration"], size)
|
||||||
self.overlay.updateOpacity(config.OVERLAY_LARGE_LOG_SETTINGS["opacity"], size, True)
|
self.overlay.updateOpacity(config.OVERLAY_LARGE_LOG_SETTINGS["opacity"], size, True)
|
||||||
self.overlay.updateUiScaling(config.OVERLAY_LARGE_LOG_SETTINGS["ui_scaling"], size)
|
self.overlay.updateUiScaling(config.OVERLAY_LARGE_LOG_SETTINGS["ui_scaling"]*0.25, size)
|
||||||
|
|
||||||
def startOverlay(self):
|
def startOverlay(self):
|
||||||
self.overlay.startOverlay()
|
self.overlay.startOverlay()
|
||||||
|
|||||||
@@ -96,13 +96,13 @@ class OverlayImage:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def getUiSizeLargeLog() -> dict:
|
def getUiSizeLargeLog() -> dict:
|
||||||
return {
|
return {
|
||||||
"width": 960,
|
"width": 960*4,
|
||||||
"font_size_large": 30,
|
"font_size_large": 30*4,
|
||||||
"font_size_small": 20,
|
"font_size_small": 20*4,
|
||||||
"margin": 25,
|
"margin": 25*4,
|
||||||
"radius": 25,
|
"radius": 25*4,
|
||||||
"padding": 10,
|
"padding": 10*4,
|
||||||
"clause_margin": 20,
|
"clause_margin": 20*4,
|
||||||
}
|
}
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user