Skip to content

Commit

Permalink
Fixed issue with emoji pop-up odd colors #619
Browse files Browse the repository at this point in the history
  • Loading branch information
hantu85 committed Jun 29, 2024
1 parent e980521 commit 37d445e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions BeagleIM/conversation/AbstractChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -487,12 +487,20 @@ class EmojiShortcodeSuggestionItemView: SuggestionItemViewBase<String> {

required init() {
emoji = NSTextField(labelWithString: "");
emoji.drawsBackground = false;
emoji.isEditable = false
emoji.isSelectable = false
emoji.isBezeled = false;
emoji.cell?.truncatesLastVisibleLine = false;
emoji.cell?.lineBreakMode = .byWordWrapping;
emoji.cell?.alignment = .center;
emoji.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal);

label = NSTextField(labelWithString: "");
label.drawsBackground = false;
label.isEditable = false
label.isSelectable = false
label.isBezeled = false;
label.font = NSFont.systemFont(ofSize: NSFont.systemFontSize - 1, weight: .medium);
label.cell?.truncatesLastVisibleLine = true;
label.cell?.lineBreakMode = .byTruncatingTail;
Expand Down Expand Up @@ -574,9 +582,17 @@ class EmojiFaceSuggestionItemView: SuggestionItemViewBase<EmojiFace> {
emoji.cell?.truncatesLastVisibleLine = false;
emoji.cell?.lineBreakMode = .byWordWrapping;
emoji.cell?.alignment = .center;
emoji.drawsBackground = false;
emoji.isEditable = false
emoji.isSelectable = false
emoji.isBezeled = false;
emoji.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal);

label = NSTextField(labelWithString: "");
label.drawsBackground = false;
label.isEditable = false
label.isSelectable = false
label.isBezeled = false;
label.font = NSFont.systemFont(ofSize: NSFont.systemFontSize - 1, weight: .medium);
label.cell?.truncatesLastVisibleLine = true;
label.cell?.lineBreakMode = .byTruncatingTail;
Expand Down
4 changes: 2 additions & 2 deletions BeagleIM/ui/suggestions/SuggestionsHighlightingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ class SuggestionsHighlightingView: NSView {
override func draw(_ dirtyRect: NSRect) {
if isHighlighted {
NSColor.alternateSelectedControlColor.set()
__NSRectFillUsingOperation(dirtyRect, .sourceOver)
__NSRectFillUsingOperation(bounds, .sourceOver)
} else {
NSColor.clear.set()
__NSRectFillUsingOperation(dirtyRect, .sourceOver)
__NSRectFillUsingOperation(bounds, .sourceOver)
}
// super.draw(dirtyRect);
}
Expand Down

0 comments on commit 37d445e

Please sign in to comment.