diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e31074c96..75fe3e0b2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,6 +22,8 @@ v3.5.2 - Fixed "Show Current" not jumping when track just out of view - Fixed image details showing ERROR with cached files - Fixed tag bar on 1.25x UI scaling + - Fixed wide art mode not locking ratio to less wide art then previous + - Fixed wide art mode lock position being slightly incorrect v3.5.1 diff --git a/tauon.py b/tauon.py index e8eeb85ce..5886a1aa3 100644 --- a/tauon.py +++ b/tauon.py @@ -10734,10 +10734,10 @@ def last_fm_menu_deco(): # line = 'Start Last.fm Scrobbling' # bg = colours.menu_background if lastfm.hold: - line = "Scrobbling is Paused" + line = _("Scrobbling is Paused") bg = colours.menu_background else: - line = "Scrobbling is Active" + line = _("Scrobbling is Active") bg = colours.menu_background return [colours.menu_text, bg, line] @@ -14258,9 +14258,11 @@ def codec_config(self): y += 25 * gui.scale self.toggle_square(x, y, switch_ogg, "OGG") y += 25 * gui.scale - self.toggle_square(x, y, switch_mp3, "MP3") - if prefs.transcode_codec == 'mp3' and not shutil.which("lame"): - ddt.draw_text((x + 90 * gui.scale, y - 3 * gui.scale), "LAME not detected!", [220, 110, 110, 255], 12) + + if not flatpak_mode: + self.toggle_square(x, y, switch_mp3, "MP3") + if prefs.transcode_codec == 'mp3' and not shutil.which("lame"): + ddt.draw_text((x + 90 * gui.scale, y - 3 * gui.scale), "LAME not detected!", [220, 110, 110, 255], 12) if prefs.transcode_codec != 'flac': y += 35 * gui.scale @@ -17096,6 +17098,7 @@ def draw(self, x, y, w, h): # Draw a background for whole area ddt.rect_r((x, y, w ,h), colours.side_panel_background, True) + # ddt.rect_r((x, y, w ,h), [255, 0, 0, 200], True) # We need to find the size of the inner square for the artwork #box = min(w, h) @@ -17103,7 +17106,6 @@ def draw(self, x, y, w, h): box_x = w box_y = h - box_x -= 17 * gui.scale # Inset the square a bit box_y -= 17 * gui.scale # Inset the square a bit @@ -18994,9 +18996,8 @@ def download_img(link, target_folder): show_message("The link does not appear to refer to an image file.", 'warning') gui.image_downloading = False - except: - - show_message("Image download failed.", 'warning') + except Exception as e: + show_message("Image download failed.", 'warning', str(e)) gui.image_downloading = False @@ -19267,11 +19268,13 @@ def update_layout_do(): box_r = gui.rspw / (window_size[1] - gui.panelBY - gui.panelY) - if gui.art_aspect_ratio > 1.2: + if gui.art_aspect_ratio > 1.01: gui.art_unlock_ratio = True if gui.art_aspect_ratio > gui.art_max_ratio_lock: gui.art_max_ratio_lock = gui.art_aspect_ratio + + # print("Avaliabe: " + str(box_r)) elif box_r <= 1: gui.art_unlock_ratio = False @@ -20875,10 +20878,18 @@ def test_show_add_home_music(): offset = gui.side_bar_drag_source - mouse_position[0] - target = gui.side_bar_drag_original + offset #window_size[0] - mouse_position[0] + target = gui.side_bar_drag_original + offset + + # Reset max ratio if drag drops below ratio width + if target < round((window_size[1] - gui.panelY - gui.panelBY) * gui.art_aspect_ratio): + gui.art_max_ratio_lock = gui.art_aspect_ratio + + max_w = round(((window_size[1] - gui.panelY - gui.panelBY - 17 * gui.scale) * gui.art_max_ratio_lock) + 17 * gui.scale) + # 17 here is the art box inset value + + if not album_mode and target > max_w: + target = max_w - if not album_mode and offset > 0 and target > (window_size[1] - gui.panelY - gui.panelBY) * gui.art_max_ratio_lock: - target = (window_size[1] - gui.panelY - gui.panelBY) * gui.art_max_ratio_lock gui.rspw = target else: gui.rspw = target @@ -22698,7 +22709,7 @@ def test_show_add_home_music(): if len(search_text.text) == 0: line = "Find in current playlist" ddt.draw_text((rect[0] + int(rect[2] / 2), window_size[1] - 84 * gui.scale, 2), line, - colours.grey(110), 12) + colours.grey(110), 312) # ddt.draw_text((rect[0] + int(rect[2] / 2), window_size[1] - 118 * gui.scale, 2), "Find", # colours.grey(90), 214)