Commit 6c3cb231 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Kateryna Kostiuk
Browse files

UI: fix call view

Fix margins in media selecting views

Change-Id: I2b8fe2bff20b53579e4aba056f9154790994b0f9
parent 56b8981e
......@@ -47,11 +47,11 @@ CGFloat ROW_HEIGHT = 35;
-(CGFloat)getTableWidth {
NSTextField* textField = [[NSTextField alloc] init];
CGFloat maxWidth = 0;
NSFont *fontName = [NSFont systemFontOfSize: 13.0 weight: NSFontWeightMedium];
NSDictionary *attrs= [NSDictionary dictionaryWithObjectsAndKeys:
fontName, NSFontAttributeName,
nil];
for (auto device : mediaDevices) {
NSFont *fontName = [NSFont systemFontOfSize: 13.0 weight: NSFontWeightMedium];
NSDictionary *attrs= [NSDictionary dictionaryWithObjectsAndKeys:
fontName, NSFontAttributeName,
nil];
NSAttributedString* attributed = [[NSAttributedString alloc] initWithString:device.toNSString() attributes: attrs];
textField.attributedStringValue = attributed;
[textField sizeToFit];
......@@ -64,6 +64,9 @@ CGFloat ROW_HEIGHT = 35;
- (void)viewDidLoad {
[super viewDidLoad];
if (@available(macOS 11.0, *)) {
devicesView.style = NSTableViewStylePlain;
}
CGFloat tableHeight = ROW_HEIGHT * mediaDevices.size();
// we do not need space for check mark for default device
auto margins = defaultDevice.isEmpty() ? 20 : 50;
......
......@@ -52,7 +52,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView distribution="equalSpacing" orientation="horizontal" alignment="centerY" spacing="10" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" translatesAutoresizingMaskIntoConstraints="NO" id="Td7-R6-qF9">
<rect key="frame" x="10" y="-1" width="80" height="20"/>
<rect key="frame" x="13" y="-1" width="80" height="20"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" tag="200" translatesAutoresizingMaskIntoConstraints="NO" id="AdH-xw-4sM">
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
......@@ -86,7 +86,7 @@
</stackView>
</subviews>
<constraints>
<constraint firstItem="Td7-R6-qF9" firstAttribute="leading" secondItem="OcL-cL-06E" secondAttribute="leading" constant="10" id="AfT-k2-Fio"/>
<constraint firstItem="Td7-R6-qF9" firstAttribute="leading" secondItem="OcL-cL-06E" secondAttribute="leading" constant="13" id="AfT-k2-Fio"/>
<constraint firstItem="Td7-R6-qF9" firstAttribute="centerY" secondItem="OcL-cL-06E" secondAttribute="centerY" id="D7s-Qp-R4b"/>
</constraints>
</tableCellView>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment