11import SwiftUI
22import VisuStructCore
33
4- /// Palette (Strukturelemente zum Einfügen/Ziehen) und Aktionen darunter: Löschen, Simulation, Code, Teilen, Export, Info.
4+ /// Palette (Strukturelemente zum Einfügen/Ziehen) und Aktionen darunter: Löschen, Simulation, Code. Teilen, Export und Info stehen im Ablage-Menü .
55struct PaletteActionList : View {
66 @ Environment ( \. horizontalSizeClass ) private var horizontalSizeClass
77 @ Environment ( \. appLanguage ) private var lang
@@ -13,10 +13,6 @@ struct PaletteActionList: View {
1313 let onDeleteSelection : ( ) -> Void
1414 let onToggleSimulation : ( ) -> Void
1515 let onGenerateCode : ( ) -> Void
16- let onSharePNG : ( ) -> Void
17- let onShareDocument : ( ) -> Void
18- let onExportPDF : ( ) -> Void
19- let onShowAbout : ( ) -> Void
2016
2117 var body : some View {
2218 let isCompact = horizontalSizeClass != . regular
@@ -85,65 +81,6 @@ struct PaletteActionList: View {
8581 . accessibilityLabel (
8682 codeGeneratorAccessGranted ? lang . tr ( " a11y_generate_code " ) : lang . tr ( " a11y_generate_code_locked " )
8783 )
88- Button {
89- onSharePNG ( )
90- } label : {
91- Label ( lang . tr ( " action_share_png " ) , systemImage : " square.and.arrow.up " )
92- . foregroundStyle ( isSimulationMode ? . tertiary : . primary )
93- }
94- . buttonStyle ( PaletteListElementButtonStyle ( ) )
95- . disabledAndDimmed ( isSimulationMode )
96- . listRowInsets (
97- isCompact
98- ? EdgeInsets ( top : 3 , leading : 10 , bottom : 3 , trailing : 10 )
99- : EdgeInsets ( top : 5 , leading : 12 , bottom : 5 , trailing : 12 )
100- )
101- . listRowSeparator ( . hidden )
102- . listRowBackground ( Color . clear )
103- Button {
104- onShareDocument ( )
105- } label : {
106- Label ( lang . tr ( " action_share_document " ) , systemImage : " square.and.arrow.up.on.square " )
107- . foregroundStyle ( isSimulationMode ? . tertiary : . primary )
108- }
109- . buttonStyle ( PaletteListElementButtonStyle ( ) )
110- . disabledAndDimmed ( isSimulationMode )
111- . listRowInsets (
112- isCompact
113- ? EdgeInsets ( top : 3 , leading : 10 , bottom : 3 , trailing : 10 )
114- : EdgeInsets ( top : 5 , leading : 12 , bottom : 5 , trailing : 12 )
115- )
116- . listRowSeparator ( . hidden )
117- . listRowBackground ( Color . clear )
118- Button {
119- onExportPDF ( )
120- } label : {
121- Label ( lang . tr ( " action_export_pdf " ) , systemImage : " doc.text.magnifyingglass " )
122- . foregroundStyle ( isSimulationMode ? . tertiary : . primary )
123- }
124- . buttonStyle ( PaletteListElementButtonStyle ( ) )
125- . disabledAndDimmed ( isSimulationMode )
126- . listRowInsets (
127- isCompact
128- ? EdgeInsets ( top : 3 , leading : 10 , bottom : 3 , trailing : 10 )
129- : EdgeInsets ( top : 5 , leading : 12 , bottom : 5 , trailing : 12 )
130- )
131- . listRowSeparator ( . hidden )
132- . listRowBackground ( Color . clear )
133-
134- Button {
135- onShowAbout ( )
136- } label : {
137- Label ( lang . tr ( " action_about " ) , systemImage : " info.circle " )
138- }
139- . buttonStyle ( PaletteListElementButtonStyle ( ) )
140- . listRowInsets (
141- isCompact
142- ? EdgeInsets ( top : 3 , leading : 10 , bottom : 4 , trailing : 10 )
143- : EdgeInsets ( top : 5 , leading : 12 , bottom : 8 , trailing : 12 )
144- )
145- . listRowSeparator ( . hidden )
146- . listRowBackground ( Color . clear )
14784 }
14885 }
14986 . listStyle ( . insetGrouped )
0 commit comments