mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
@@ -10,9 +10,7 @@ import SwiftUI
|
||||
struct GeneralPreferencesView: View {
|
||||
|
||||
@EnvironmentObject private var defaults: AppDefaults
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
@StateObject private var preferences = GeneralPreferencesModel()
|
||||
private let colorPalettes = UserInterfaceColorPalette.allCases
|
||||
|
||||
var body: some View {
|
||||
Form {
|
||||
@@ -42,15 +40,6 @@ struct GeneralPreferencesView: View {
|
||||
|
||||
Toggle("Hide Unread Count in Dock", isOn: $defaults.hideDockUnreadCount)
|
||||
|
||||
Divider()
|
||||
|
||||
Picker("Appearance", selection: $defaults.userInterfaceColorPalette, content: {
|
||||
ForEach(colorPalettes, id: \.self, content: {
|
||||
Text($0.description)
|
||||
})
|
||||
}).pickerStyle(RadioGroupPickerStyle())
|
||||
|
||||
|
||||
}
|
||||
.frame(width: 400, alignment: .center)
|
||||
.lineLimit(2)
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// LayoutPreferencesView.swift
|
||||
// Multiplatform macOS
|
||||
//
|
||||
// Created by Stuart Breckenridge on 17/7/20.
|
||||
// Copyright © 2020 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct LayoutPreferencesView: View {
|
||||
|
||||
@EnvironmentObject var defaults: AppDefaults
|
||||
private let colorPalettes = UserInterfaceColorPalette.allCases
|
||||
|
||||
var body: some View {
|
||||
Form {
|
||||
Picker("Appearance", selection: $defaults.userInterfaceColorPalette, content: {
|
||||
ForEach(colorPalettes, id: \.self, content: {
|
||||
Text($0.description)
|
||||
})
|
||||
})
|
||||
|
||||
Divider()
|
||||
|
||||
Text("Timeline: ")
|
||||
Picker("Number of Lines", selection: $defaults.timelineNumberOfLines, content: {
|
||||
ForEach(1..<6, content: { i in
|
||||
Text(String(i))
|
||||
.tag(Double(i))
|
||||
})
|
||||
}).padding(.leading, 16)
|
||||
Slider(value: $defaults.timelineIconDimensions, in: 20...60, step: 10, minimumValueLabel: Text("Small"), maximumValueLabel: Text("Large"), label: {
|
||||
Text("Icon Size")
|
||||
}).padding(.leading, 16)
|
||||
}
|
||||
.frame(width: 400, alignment: .center)
|
||||
}
|
||||
}
|
||||
|
||||
struct SwiftUIView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
LayoutPreferencesView()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user