Skip to content
Snippets Groups Projects
Commit 56b8981e authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

UI: fix plugins view in call

Change-Id: I103814433a8ca87adc9201d75f38504b4b60438a
parent 1d58a323
No related branches found
No related tags found
No related merge requests found
...@@ -75,11 +75,16 @@ CGFloat PLUGIN_ROW_HEIGHT = 35; ...@@ -75,11 +75,16 @@ CGFloat PLUGIN_ROW_HEIGHT = 35;
NSTextField* textField = [[NSTextField alloc] init]; NSTextField* textField = [[NSTextField alloc] init];
CGFloat maxWidth = 0; CGFloat maxWidth = 0;
NSFont *fontName = [NSFont systemFontOfSize: 13.0 weight: NSFontWeightMedium]; NSFont *fontName = [NSFont systemFontOfSize: 13.0 weight: NSFontWeightMedium];
for (auto plugin : availableHandlers) {
NSDictionary *attrs= [NSDictionary dictionaryWithObjectsAndKeys: NSDictionary *attrs= [NSDictionary dictionaryWithObjectsAndKeys:
fontName, NSFontAttributeName, fontName, NSFontAttributeName,
nil]; nil];
NSAttributedString* attributed = [[NSAttributedString alloc] initWithString:plugin.toNSString() attributes: attrs]; for (auto handler : availableHandlers) {
lrc::api::plugin::PluginHandlerDetails handlerDetails;
if (handlerType == FROM_CALL)
handlerDetails = pluginModel->getCallMediaHandlerDetails(handler);
else
handlerDetails = pluginModel->getChatHandlerDetails(handler);
NSAttributedString* attributed = [[NSAttributedString alloc] initWithString:handlerDetails.name.toNSString() attributes: attrs];
textField.attributedStringValue = attributed; textField.attributedStringValue = attributed;
[textField sizeToFit]; [textField sizeToFit];
if (textField.frame.size.width > maxWidth) { if (textField.frame.size.width > maxWidth) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment