Added a new Medium media style

This commit is contained in:
Thomas Ricouard 2023-02-22 07:26:32 +01:00
parent 37a69650ef
commit 4576507225
19 changed files with 24 additions and 2 deletions

View file

@ -37,6 +37,7 @@
"enum.status-actions-display.only-buttons" = "Толькі кнопкі"; "enum.status-actions-display.only-buttons" = "Толькі кнопкі";
"enum.status-display-style.compact" = "Кампактны"; "enum.status-display-style.compact" = "Кампактны";
"enum.status-display-style.large" = "Вялікі"; "enum.status-display-style.large" = "Вялікі";
"enum.status-display-style.medium" = "Medium";
"enum.swipeactions.icon-with-text" = "Значкі з тэкстам"; "enum.swipeactions.icon-with-text" = "Значкі з тэкстам";
"enum.swipeactions.icon-only" = "Толькі значкі"; "enum.swipeactions.icon-only" = "Толькі значкі";

View file

@ -36,6 +36,7 @@
"enum.status-actions-display.only-buttons" = "Només els botons"; "enum.status-actions-display.only-buttons" = "Només els botons";
"enum.status-display-style.compact" = "Compacte"; "enum.status-display-style.compact" = "Compacte";
"enum.status-display-style.large" = "Gran"; "enum.status-display-style.large" = "Gran";
"enum.status-display-style.medium" = "Medium";
"enum.swipeactions.icon-with-text" = "Icon with text"; "enum.swipeactions.icon-with-text" = "Icon with text";
"enum.swipeactions.icon-only" = "Icon only"; "enum.swipeactions.icon-only" = "Icon only";

View file

@ -36,6 +36,7 @@
"enum.status-actions-display.no-buttons" = "Keine Buttons"; "enum.status-actions-display.no-buttons" = "Keine Buttons";
"enum.status-actions-display.only-buttons" = "Nur Buttons"; "enum.status-actions-display.only-buttons" = "Nur Buttons";
"enum.status-display-style.compact" = "Kompakt"; "enum.status-display-style.compact" = "Kompakt";
"enum.status-display-style.medium" = "Medium";
"enum.status-display-style.large" = "Groß"; "enum.status-display-style.large" = "Groß";
"enum.swipeactions.icon-with-text" = "Symbol mit Text"; "enum.swipeactions.icon-with-text" = "Symbol mit Text";
"enum.swipeactions.icon-only" = "Nur Symbol"; "enum.swipeactions.icon-only" = "Nur Symbol";

View file

@ -37,6 +37,7 @@
"enum.status-actions-display.only-buttons" = "Only buttons"; "enum.status-actions-display.only-buttons" = "Only buttons";
"enum.status-display-style.compact" = "Compact"; "enum.status-display-style.compact" = "Compact";
"enum.status-display-style.large" = "Large"; "enum.status-display-style.large" = "Large";
"enum.status-display-style.medium" = "Medium";
"enum.swipeactions.icon-with-text" = "Icon with text"; "enum.swipeactions.icon-with-text" = "Icon with text";
"enum.swipeactions.icon-only" = "Icon only"; "enum.swipeactions.icon-only" = "Icon only";

View file

@ -36,6 +36,7 @@
"enum.status-actions-display.no-buttons" = "No buttons"; "enum.status-actions-display.no-buttons" = "No buttons";
"enum.status-actions-display.only-buttons" = "Only buttons"; "enum.status-actions-display.only-buttons" = "Only buttons";
"enum.status-display-style.compact" = "Compact"; "enum.status-display-style.compact" = "Compact";
"enum.status-display-style.medium" = "Medium";
"enum.status-display-style.large" = "Large"; "enum.status-display-style.large" = "Large";
"enum.swipeactions.icon-with-text" = "Icon with text"; "enum.swipeactions.icon-with-text" = "Icon with text";
"enum.swipeactions.icon-only" = "Icon only"; "enum.swipeactions.icon-only" = "Icon only";

View file

@ -36,6 +36,7 @@
"enum.status-actions-display.no-buttons" = "Sin botones"; "enum.status-actions-display.no-buttons" = "Sin botones";
"enum.status-actions-display.only-buttons" = "Sólo botones"; "enum.status-actions-display.only-buttons" = "Sólo botones";
"enum.status-display-style.compact" = "Compacto"; "enum.status-display-style.compact" = "Compacto";
"enum.status-display-style.medium" = "Medium";
"enum.status-display-style.large" = "Grande"; "enum.status-display-style.large" = "Grande";
"enum.swipeactions.icon-with-text" = "Icon with text"; "enum.swipeactions.icon-with-text" = "Icon with text";
"enum.swipeactions.icon-only" = "Icon only"; "enum.swipeactions.icon-only" = "Icon only";

View file

@ -37,6 +37,7 @@
"enum.status-actions-display.only-buttons" = "Botoiak bakarrik"; "enum.status-actions-display.only-buttons" = "Botoiak bakarrik";
"enum.status-display-style.compact" = "Trinkoa"; "enum.status-display-style.compact" = "Trinkoa";
"enum.status-display-style.large" = "Handia"; "enum.status-display-style.large" = "Handia";
"enum.status-display-style.medium" = "Medium";
"enum.swipeactions.icon-with-text" = "Ikonoa eta testua"; "enum.swipeactions.icon-with-text" = "Ikonoa eta testua";
"enum.swipeactions.icon-only" = "Ikonoa soilik"; "enum.swipeactions.icon-only" = "Ikonoa soilik";

View file

@ -37,6 +37,7 @@
"enum.status-actions-display.only-buttons" = "Seulement les boutons"; "enum.status-actions-display.only-buttons" = "Seulement les boutons";
"enum.status-display-style.compact" = "Compact"; "enum.status-display-style.compact" = "Compact";
"enum.status-display-style.large" = "Grand"; "enum.status-display-style.large" = "Grand";
"enum.status-display-style.medium" = "Moyen";
"enum.swipeactions.icon-with-text" = "Icon with text"; "enum.swipeactions.icon-with-text" = "Icon with text";
"enum.swipeactions.icon-only" = "Icon only"; "enum.swipeactions.icon-only" = "Icon only";

View file

@ -37,6 +37,7 @@
"enum.status-actions-display.only-buttons" = "Solo bottoni"; "enum.status-actions-display.only-buttons" = "Solo bottoni";
"enum.status-display-style.compact" = "Compatto"; "enum.status-display-style.compact" = "Compatto";
"enum.status-display-style.large" = "Completo"; "enum.status-display-style.large" = "Completo";
"enum.status-display-style.medium" = "Medium";
"enum.swipeactions.icon-with-text" = "Icon e testo"; "enum.swipeactions.icon-with-text" = "Icon e testo";
"enum.swipeactions.icon-only" = "Solo icone"; "enum.swipeactions.icon-only" = "Solo icone";

View file

@ -37,6 +37,7 @@
"enum.status-actions-display.only-buttons" = "ボタンのみ"; "enum.status-actions-display.only-buttons" = "ボタンのみ";
"enum.status-display-style.compact" = "縮小"; "enum.status-display-style.compact" = "縮小";
"enum.status-display-style.large" = "拡大"; "enum.status-display-style.large" = "拡大";
"enum.status-display-style.medium" = "Medium";
"enum.swipeactions.icon-with-text" = "アイコンと文字"; "enum.swipeactions.icon-with-text" = "アイコンと文字";
"enum.swipeactions.icon-only" = "アイコンのみ"; "enum.swipeactions.icon-only" = "アイコンのみ";

View file

@ -37,6 +37,7 @@
"enum.status-actions-display.only-buttons" = "버튼만 표시"; "enum.status-actions-display.only-buttons" = "버튼만 표시";
"enum.status-display-style.compact" = "작게"; "enum.status-display-style.compact" = "작게";
"enum.status-display-style.large" = "크게"; "enum.status-display-style.large" = "크게";
"enum.status-display-style.medium" = "Medium";
"enum.swipeactions.icon-with-text" = "아이콘과 텍스트"; "enum.swipeactions.icon-with-text" = "아이콘과 텍스트";
"enum.swipeactions.icon-only" = "아이콘만"; "enum.swipeactions.icon-only" = "아이콘만";

View file

@ -37,6 +37,7 @@
"enum.status-actions-display.only-buttons" = "Bare knapper"; "enum.status-actions-display.only-buttons" = "Bare knapper";
"enum.status-display-style.compact" = "Kompakt"; "enum.status-display-style.compact" = "Kompakt";
"enum.status-display-style.large" = "Stor"; "enum.status-display-style.large" = "Stor";
"enum.status-display-style.medium" = "Medium";
"enum.swipeactions.icon-with-text" = "Icon with text"; "enum.swipeactions.icon-with-text" = "Icon with text";
"enum.swipeactions.icon-only" = "Icon only"; "enum.swipeactions.icon-only" = "Icon only";

View file

@ -36,6 +36,7 @@
"enum.status-actions-display.no-buttons" = "Geen knoppen"; "enum.status-actions-display.no-buttons" = "Geen knoppen";
"enum.status-actions-display.only-buttons" = "Zonder tekst"; "enum.status-actions-display.only-buttons" = "Zonder tekst";
"enum.status-display-style.compact" = "Compact"; "enum.status-display-style.compact" = "Compact";
"enum.status-display-style.medium" = "Medium";
"enum.status-display-style.large" = "Groot"; "enum.status-display-style.large" = "Groot";
"enum.swipeactions.icon-with-text" = "Symbolen en tekst"; "enum.swipeactions.icon-with-text" = "Symbolen en tekst";
"enum.swipeactions.icon-only" = "Alleen symbolen"; "enum.swipeactions.icon-only" = "Alleen symbolen";

View file

@ -37,6 +37,7 @@
"enum.status-actions-display.only-buttons" = "Tylko przyciski"; "enum.status-actions-display.only-buttons" = "Tylko przyciski";
"enum.status-display-style.compact" = "Pomniejszone"; "enum.status-display-style.compact" = "Pomniejszone";
"enum.status-display-style.large" = "Duże"; "enum.status-display-style.large" = "Duże";
"enum.status-display-style.medium" = "Medium";
"enum.swipeactions.icon-with-text" = "Ikona z tekstem"; "enum.swipeactions.icon-with-text" = "Ikona z tekstem";
"enum.swipeactions.icon-only" = "Tylko ikona"; "enum.swipeactions.icon-only" = "Tylko ikona";

View file

@ -37,6 +37,7 @@
"enum.status-actions-display.only-buttons" = "Somente botões"; "enum.status-actions-display.only-buttons" = "Somente botões";
"enum.status-display-style.compact" = "Compacto"; "enum.status-display-style.compact" = "Compacto";
"enum.status-display-style.large" = "Largo"; "enum.status-display-style.large" = "Largo";
"enum.status-display-style.medium" = "Medium";
"enum.swipeactions.icon-with-text" = "Icon with text"; "enum.swipeactions.icon-with-text" = "Icon with text";
"enum.swipeactions.icon-only" = "Icon only"; "enum.swipeactions.icon-only" = "Icon only";

View file

@ -37,6 +37,7 @@
"enum.status-actions-display.only-buttons" = "Sadece Butonlar"; "enum.status-actions-display.only-buttons" = "Sadece Butonlar";
"enum.status-display-style.compact" = "Kompakt"; "enum.status-display-style.compact" = "Kompakt";
"enum.status-display-style.large" = "Geniş"; "enum.status-display-style.large" = "Geniş";
"enum.status-display-style.medium" = "Medium";
"enum.swipeactions.icon-with-text" = "Icon with text"; "enum.swipeactions.icon-with-text" = "Icon with text";
"enum.swipeactions.icon-only" = "Icon only"; "enum.swipeactions.icon-only" = "Icon only";

View file

@ -37,6 +37,7 @@
"enum.status-actions-display.only-buttons" = "仅图标"; "enum.status-actions-display.only-buttons" = "仅图标";
"enum.status-display-style.compact" = "紧凑"; "enum.status-display-style.compact" = "紧凑";
"enum.status-display-style.large" = "宽松"; "enum.status-display-style.large" = "宽松";
"enum.status-display-style.medium" = "Medium";
"enum.swipeactions.icon-with-text" = "图标和文本"; "enum.swipeactions.icon-with-text" = "图标和文本";
"enum.swipeactions.icon-only" = "仅图标"; "enum.swipeactions.icon-only" = "仅图标";

View file

@ -76,12 +76,14 @@ public class Theme: ObservableObject {
} }
public enum StatusDisplayStyle: String, CaseIterable { public enum StatusDisplayStyle: String, CaseIterable {
case large, compact case large, medium, compact
public var description: LocalizedStringKey { public var description: LocalizedStringKey {
switch self { switch self {
case .large: case .large:
return "enum.status-display-style.large" return "enum.status-display-style.large"
case .medium:
return "enum.status-display-style.medium"
case .compact: case .compact:
return "enum.status-display-style.compact" return "enum.status-display-style.compact"
} }

View file

@ -27,7 +27,7 @@ public struct StatusRowMediaPreviewView: View {
var availableWidth: CGFloat { var availableWidth: CGFloat {
if UIDevice.current.userInterfaceIdiom == .phone && if UIDevice.current.userInterfaceIdiom == .phone &&
(UIDevice.current.orientation == .landscapeLeft || UIDevice.current.orientation == .landscapeRight) { (UIDevice.current.orientation == .landscapeLeft || UIDevice.current.orientation == .landscapeRight) || theme.statusDisplayStyle == .medium {
return sceneDelegate.windowWidth * 0.80 return sceneDelegate.windowWidth * 0.80
} }
return sceneDelegate.windowWidth return sceneDelegate.windowWidth
@ -55,6 +55,9 @@ public struct StatusRowMediaPreviewView: View {
return 50 return 50
} }
if theme.statusDisplayStyle == .compact { if theme.statusDisplayStyle == .compact {
if attachments.count == 1 {
return 200
}
return 100 return 100
} }
if attachments.count == 1 { if attachments.count == 1 {