Skip to content

Commit a9f4e90

Browse files
committed
Merge branch 'develop'
2 parents 459f5a5 + 7b2d4ee commit a9f4e90

File tree

5 files changed

+43
-42
lines changed

5 files changed

+43
-42
lines changed

IINA+.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@
11681168
"@executable_path/../Frameworks",
11691169
);
11701170
MACOSX_DEPLOYMENT_TARGET = 13.5;
1171-
MARKETING_VERSION = 0.8.12;
1171+
MARKETING_VERSION = 0.8.13;
11721172
PRODUCT_BUNDLE_IDENTIFIER = "com.xjbeta.iina-plus";
11731173
PRODUCT_NAME = "$(TARGET_NAME)";
11741174
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1195,7 +1195,7 @@
11951195
"@executable_path/../Frameworks",
11961196
);
11971197
MACOSX_DEPLOYMENT_TARGET = 13.5;
1198-
MARKETING_VERSION = 0.8.12;
1198+
MARKETING_VERSION = 0.8.13;
11991199
PRODUCT_BUNDLE_IDENTIFIER = "com.xjbeta.iina-plus";
12001200
PRODUCT_NAME = "$(TARGET_NAME)";
12011201
PROVISIONING_PROFILE_SPECIFIER = "";

IINA+/Views SwiftUI/Preferences/GeneralPrefsView.swift

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ struct GeneralPrefsView: View {
3131
formatter.usesGroupingSeparator = false
3232
return formatter
3333
}()
34+
35+
@AppStorage(PreferenceKeys.enableFlvjs.rawValue)
36+
private var enableFlvjs: Bool = false
37+
38+
@AppStorage(PreferenceKeys.autoOpenResult.rawValue)
39+
private var autoOpenResult: Bool = false
40+
41+
@AppStorage(PreferenceKeys.enableDanmaku.rawValue)
42+
private var enableDanmaku: Bool = false
43+
3444

3545
var body: some View {
3646
Grid(alignment: .leading) {
@@ -96,23 +106,15 @@ struct GeneralPrefsView: View {
96106

97107
GridRow {
98108
Spacer()
99-
Toggle(isOn: .init(get: {
100-
Preferences.shared.enableFlvjs
101-
}, set: {
102-
Preferences.shared.enableFlvjs = $0
103-
})) {
109+
Toggle(isOn: $enableFlvjs) {
104110
LocalizedText("nYK-y9-7tF.title", tableName: .preferences)
105111
}
106112
.toggleStyle(.checkbox)
107113
}
108114

109115
GridRow {
110116
Spacer()
111-
Toggle(isOn: .init(get: {
112-
Preferences.shared.autoOpenResult
113-
}, set: {
114-
Preferences.shared.autoOpenResult = $0
115-
})) {
117+
Toggle(isOn: $autoOpenResult) {
116118
LocalizedText("hPC-yj-akr.title", tableName: .preferences)
117119
}
118120
.toggleStyle(.checkbox)
@@ -138,11 +140,7 @@ struct GeneralPrefsView: View {
138140
GridRow {
139141
LocalizedText("wRZ-RD-AEu.title", tableName: .preferences)
140142
.frame(maxWidth: .infinity, alignment: .trailing)
141-
Toggle(isOn: .init(get: {
142-
Preferences.shared.enableDanmaku
143-
}, set: {
144-
Preferences.shared.enableDanmaku = $0
145-
})) {
143+
Toggle(isOn: $enableDanmaku) {
146144

147145
}
148146
.toggleStyle(.switch)

IINA+/Views SwiftUI/Preferences/SitePrefsView.swift

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ struct SitePrefsView: View {
3737
@State var biliStatus: Status = .loading
3838
@State var biliUserName = ""
3939
@State var biliLoginSheet = false
40+
41+
@AppStorage(PreferenceKeys.bilibiliCodec.rawValue)
42+
private var bilibiliCodec: Int = BiliCodec.avc.id
43+
44+
@AppStorage(PreferenceKeys.bililiveHevc.rawValue)
45+
private var bililiveHevc: Bool = false
46+
47+
@AppStorage(PreferenceKeys.bilibiliHTMLDecoder.rawValue)
48+
private var bilibiliHTMLDecoder: Bool = false
4049

4150
var body: some View {
4251
VStack {
@@ -94,11 +103,7 @@ struct SitePrefsView: View {
94103
LocalizedText("QVl-54-yko.title", tableName: .preferences)
95104
.frame(maxWidth: .infinity, alignment: .trailing)
96105

97-
Picker("", selection: .init(get: {
98-
Preferences.shared.bilibiliCodec
99-
}, set: {
100-
Preferences.shared.bilibiliCodec = $0
101-
})) {
106+
Picker("", selection: $bilibiliCodec) {
102107
ForEach(BiliCodec.allCases) {
103108
Text($0.name).tag($0.rawValue)
104109
}
@@ -111,11 +116,7 @@ struct SitePrefsView: View {
111116
LocalizedText("iTL-J0-MpL.title", tableName: .preferences)
112117
.frame(maxWidth: .infinity, alignment: .trailing)
113118

114-
Toggle(isOn: .init(get: {
115-
Preferences.shared.bililiveHevc
116-
}, set: {
117-
Preferences.shared.bililiveHevc = $0
118-
})) {
119+
Toggle(isOn: $bililiveHevc) {
119120
}
120121
.toggleStyle(.checkbox)
121122
}
@@ -124,11 +125,7 @@ struct SitePrefsView: View {
124125
LocalizedText("vR2-ZU-hgL.title", tableName: .preferences)
125126
.frame(maxWidth: .infinity, alignment: .trailing)
126127

127-
Toggle(isOn: .init(get: {
128-
Preferences.shared.bilibiliHTMLDecoder
129-
}, set: {
130-
Preferences.shared.bilibiliHTMLDecoder = $0
131-
})) {
128+
Toggle(isOn: $bilibiliHTMLDecoder) {
132129
}
133130
.toggleStyle(.checkbox)
134131
}

IINA+/Views/Base.lproj/Main.storyboard

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -323,19 +323,19 @@
323323
<autoresizingMask key="autoresizingMask"/>
324324
<subviews>
325325
<visualEffectView blendingMode="behindWindow" material="sidebar" state="followsWindowActiveState" translatesAutoresizingMaskIntoConstraints="NO" id="dDP-PF-C0a">
326-
<rect key="frame" x="0.0" y="0.0" width="72" height="412"/>
326+
<rect key="frame" x="0.0" y="0.0" width="72" height="410"/>
327327
<subviews>
328328
<progressIndicator wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="JWL-uO-Ceb">
329329
<rect key="frame" x="28" y="20" width="16" height="16"/>
330330
</progressIndicator>
331331
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="74" horizontalPageScroll="10" verticalLineScroll="74" verticalPageScroll="10" usesPredominantAxisScrolling="NO" horizontalScrollElasticity="none" verticalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="99a-57-nij">
332-
<rect key="frame" x="0.0" y="61" width="72" height="311"/>
332+
<rect key="frame" x="0.0" y="61" width="72" height="309"/>
333333
<clipView key="contentView" ambiguous="YES" drawsBackground="NO" copiesOnScroll="NO" id="mxK-09-4I5">
334-
<rect key="frame" x="0.0" y="0.0" width="72" height="311"/>
334+
<rect key="frame" x="0.0" y="0.0" width="72" height="309"/>
335335
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
336336
<subviews>
337337
<tableView verticalHuggingPriority="750" ambiguous="YES" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="fullWidth" selectionHighlightStyle="none" columnReordering="NO" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" rowHeight="49" viewBased="YES" id="fYM-Cq-LN4" customClass="SidebarTableView" customModule="IINA_" customModuleProvider="target">
338-
<rect key="frame" x="0.0" y="0.0" width="72" height="311"/>
338+
<rect key="frame" x="0.0" y="0.0" width="72" height="309"/>
339339
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
340340
<size key="intercellSpacing" width="1" height="25"/>
341341
<color key="backgroundColor" white="1" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -444,11 +444,11 @@
444444
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="57" horizontalPageScroll="10" verticalLineScroll="57" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="txu-4A-pVl" customClass="NonePocketScrollView" customModule="IINA_" customModuleProvider="target">
445445
<rect key="frame" x="0.0" y="0.0" width="377" height="633"/>
446446
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="4Jt-mc-KNh">
447-
<rect key="frame" x="0.0" y="0.0" width="377" height="613"/>
447+
<rect key="frame" x="0.0" y="0.0" width="377" height="616"/>
448448
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
449449
<subviews>
450450
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="plain" columnReordering="NO" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" rowHeight="57" viewBased="YES" id="9PD-kf-1gB" customClass="MainWindowTableView" customModule="IINA_" customModuleProvider="target">
451-
<rect key="frame" x="0.0" y="0.0" width="399" height="597"/>
451+
<rect key="frame" x="0.0" y="0.0" width="399" height="600"/>
452452
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
453453
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
454454
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
@@ -610,9 +610,9 @@
610610
<nil key="backgroundColor"/>
611611
<edgeInsets key="contentInsets" left="11" right="11" top="8" bottom="8"/>
612612
</clipView>
613-
<edgeInsets key="scrollerInsets" left="0.0" right="0.0" top="-25" bottom="3"/>
613+
<edgeInsets key="contentInsets" left="0.0" right="0.0" top="0.0" bottom="0.0"/>
614614
<scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="0.25" horizontal="YES" id="pPI-Nn-fv1">
615-
<rect key="frame" x="0.0" y="613" width="377" height="17"/>
615+
<rect key="frame" x="0.0" y="616" width="377" height="17"/>
616616
<autoresizingMask key="autoresizingMask"/>
617617
</scroller>
618618
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="fcK-y5-QLE">
@@ -873,7 +873,6 @@
873873
<nil key="backgroundColor"/>
874874
<edgeInsets key="contentInsets" left="11" right="11" top="8" bottom="8"/>
875875
</clipView>
876-
<edgeInsets key="scrollerInsets" left="0.0" right="0.0" top="-25" bottom="3"/>
877876
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="0.5" horizontal="YES" id="baG-5p-gSI">
878877
<rect key="frame" x="0.0" y="633" width="389" height="16"/>
879878
<autoresizingMask key="autoresizingMask"/>
@@ -912,7 +911,7 @@
912911
<rect key="frame" x="20" y="20" width="340" height="570"/>
913912
<clipView key="contentView" drawsBackground="NO" id="UI5-GE-yfn">
914913
<rect key="frame" x="0.0" y="0.0" width="340" height="570"/>
915-
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
914+
<autoresizingMask key="autoresizingMask"/>
916915
<subviews>
917916
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="plain" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" rowHeight="30" viewBased="YES" id="XaB-Al-kaU" customClass="SuggestionsTableView" customModule="IINA_" customModuleProvider="target">
918917
<rect key="frame" x="0.0" y="0.0" width="340" height="570"/>

IINA+/Views/MainWindow/NonePocketScrollView.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ class NonePocketScrollView: NSScrollView {
1616
// Drawing code here.
1717
}
1818

19+
override var automaticallyAdjustsContentInsets: Bool {
20+
get {
21+
false
22+
}
23+
set { }
24+
}
25+
1926
override func addSubview(_ view: NSView) {
2027
let name = String(describing: type(of: view))
2128
if name == "NSScrollPocket" {

0 commit comments

Comments
 (0)