Commit 56b8981e authored by Kateryna Kostiuk's avatar Kateryna Kostiuk

UI: fix plugins view in call

Change-Id: I103814433a8ca87adc9201d75f38504b4b60438a
parent 1d58a323
......@@ -75,11 +75,16 @@ CGFloat PLUGIN_ROW_HEIGHT = 35;
NSTextField* textField = [[NSTextField alloc] init];
CGFloat maxWidth = 0;
NSFont *fontName = [NSFont systemFontOfSize: 13.0 weight: NSFontWeightMedium];
for (auto plugin : availableHandlers) {
NSDictionary *attrs= [NSDictionary dictionaryWithObjectsAndKeys:
fontName, NSFontAttributeName,
nil];
NSAttributedString* attributed = [[NSAttributedString alloc] initWithString:plugin.toNSString() attributes: attrs];
NSDictionary *attrs= [NSDictionary dictionaryWithObjectsAndKeys:
fontName, NSFontAttributeName,
nil];
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 sizeToFit];
if (textField.frame.size.width > maxWidth) {
......
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