-
-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
342 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
uPic/Views/HistoryRecord/HistoryPreviewCustomScrollView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// HistoryPreviewCustomScrollView.swift | ||
// uPic | ||
// | ||
// Created by 侯猛 on 2019/11/25. | ||
// Copyright © 2019 Svend Jin. All rights reserved. | ||
// | ||
|
||
import Cocoa | ||
|
||
class HistoryPreviewCustomScrollView: NSScrollView { | ||
|
||
override func draw(_ dirtyRect: NSRect) { | ||
super.draw(dirtyRect) | ||
|
||
// Drawing code here. | ||
} | ||
|
||
override func hitTest(_ point: NSPoint) -> NSView? { | ||
return nil | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// HistoryThumbnailConstant.swift | ||
// uPic | ||
// | ||
// Created by 侯猛 on 2019/11/25. | ||
// Copyright © 2019 Svend Jin. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
/// 历史记录总宽 | ||
var historyRecordViewWidthGlobal: CGFloat { | ||
return 500 | ||
} | ||
/// 预览图列数 | ||
var previewLineNumberGlobal: Int { | ||
return 3 | ||
} | ||
/// 预览图间距 | ||
var previewLineSpacingGlobal: CGFloat { | ||
return 5 | ||
} | ||
/// 历史记录内边距 | ||
var historyRecordLeftRightInsetGlobal: CGFloat { | ||
return 5 | ||
} | ||
/// 预览图宽度 | ||
var previewWidthGlobal: CGFloat { | ||
return (historyRecordViewWidthGlobal - CGFloat((previewLineNumberGlobal - 1)) * previewLineSpacingGlobal - historyRecordLeftRightInsetGlobal * 2) / CGFloat(previewLineNumberGlobal) | ||
} | ||
/// 预览图默认宽度 | ||
var previewDefaulWidthGlobal: CGFloat { | ||
return 300 | ||
} | ||
|
||
/// 文件名滚动时间速度 s 单位 | ||
var fileNameScrollAnimationTime: TimeInterval { | ||
return 0.03 | ||
} | ||
|
||
var fileNameScrollingTime: CGFloat { | ||
return 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.