mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 22:51:39 +00:00
xibless-ified PE\s details panel.
--HG-- branch : xibless rename : cocoa/pe/DetailsPanel.h => cocoa/pe/DetailsPanelPE.h rename : cocoa/pe/DetailsPanel.m => cocoa/pe/DetailsPanelPE.m
This commit is contained in:
74
cocoa/pe/ui/details_panel.py
Normal file
74
cocoa/pe/ui/details_panel.py
Normal file
@@ -0,0 +1,74 @@
|
||||
ownerclass = 'DetailsPanelPE'
|
||||
ownerimport = 'DetailsPanelPE.h'
|
||||
|
||||
result = Panel(593, 398, "Details of Selected File")
|
||||
table = TableView(result)
|
||||
split = SplitView(result, 2, vertical=True)
|
||||
leftSplit, rightSplit = split.subviews
|
||||
selectedLabel = Label(leftSplit, "Selected")
|
||||
selectedImage = ImageView(leftSplit, 'NSApplicationIcon')
|
||||
leftSpinner = ProgressIndicator(leftSplit)
|
||||
referenceLabel = Label(rightSplit, "Reference")
|
||||
referenceImage = ImageView(rightSplit, 'NSApplicationIcon')
|
||||
rightSpinner = ProgressIndicator(rightSplit)
|
||||
|
||||
owner.detailsTable = table
|
||||
owner.dupeImage = selectedImage
|
||||
owner.dupeProgressIndicator = leftSpinner
|
||||
owner.refImage = referenceImage
|
||||
owner.refProgressIndicator = rightSpinner
|
||||
table.dataSource = owner
|
||||
|
||||
result.style = PanelStyle.Utility
|
||||
result.xProportion = 0.6
|
||||
result.yProportion = 0.6
|
||||
result.canMinimize = False
|
||||
result.autosaveName = 'DetailsPanel'
|
||||
result.minSize = Size(451, 240)
|
||||
|
||||
table.allowsColumnReordering = False
|
||||
table.allowsColumnSelection = False
|
||||
table.allowsMultipleSelection = False
|
||||
table.font = Font(FontFamily.System, FontSize.SmallSystem)
|
||||
table.rowHeight = 14
|
||||
table.editable = False
|
||||
col = table.addColumn('0', "Attribute", 70)
|
||||
col.autoResizable = True
|
||||
col = table.addColumn('1', "Selected", 198)
|
||||
col.autoResizable = True
|
||||
col = table.addColumn('2', "Reference", 172)
|
||||
col.autoResizable = True
|
||||
table.height = 165
|
||||
|
||||
sides = [
|
||||
(leftSplit, selectedLabel, selectedImage, leftSpinner),
|
||||
(rightSplit, referenceLabel, referenceImage, rightSpinner),
|
||||
]
|
||||
for subSplit, label, image, spinner in sides:
|
||||
label.alignment = TextAlignment.Center
|
||||
spinner.style = const.NSProgressIndicatorSpinningStyle
|
||||
spinner.controlSize = const.NSSmallControlSize
|
||||
spinner.displayedWhenStopped = False
|
||||
|
||||
subSplit.ignoreMargin = True
|
||||
label.packToCorner(Pack.UpperLeft)
|
||||
label.fill(Pack.Right)
|
||||
label.setAnchor(Pack.UpperLeft, growX=True)
|
||||
image.packRelativeTo(label, Pack.Below)
|
||||
image.fill(Pack.Right)
|
||||
image.fill(Pack.Below)
|
||||
image.setAnchor(Pack.UpperLeft, growX=True, growY=True)
|
||||
spinner.y = label.y
|
||||
spinner.x = subSplit.width - 30
|
||||
spinner.setAnchor(Pack.UpperRight)
|
||||
|
||||
result.ignoreMargin = True
|
||||
table.packToCorner(Pack.UpperLeft)
|
||||
table.fill(Pack.Right)
|
||||
table.setAnchor(Pack.UpperLeft, growX=True)
|
||||
|
||||
split.packRelativeTo(table, Pack.Below)
|
||||
split.fill(Pack.Right)
|
||||
split.fill(Pack.Below)
|
||||
split.setAnchor(Pack.UpperLeft, growX=True, growY=True)
|
||||
|
||||
Reference in New Issue
Block a user