fixed: _CPButtonBarPopUpButton did not show icon

This commit is contained in:
daboe01 committed 2022-04-02 23:41:37 +02:00
1 parent 96aa310839
commit 692f365fed
1 file changed
+6 -7
+6 -7
View File
@@ -1519,6 +1519,9 @@ var CPButtonBarHasLeftResizeControlKey = @"CPButtonBarHasLeftResizeControl
#pragma mark Popup
@implementation _CPButtonBarPopUpButton : CPPopUpButton
{
CPImage _image;
}
+ (CPString)defaultThemeClass
{
@@ -1547,8 +1550,7 @@ var CPButtonBarHasLeftResizeControlKey = @"CPButtonBarHasLeftResizeControl
if (self)
{
[self setControlSize:CPSmallControlSize];
[self addItemWithTitle:nil];
[[self lastItem] setImage:image];
_image = image;
[self setImagePosition:CPImageOnly];
[self setAlternateImage:alternateImage];
[self setBezelStyle:CPRegularSquareBezelStyle];
@@ -1605,11 +1607,8 @@ var CPButtonBarHasLeftResizeControlKey = @"CPButtonBarHasLeftResizeControl
if (contentView)
{
var title = nil,
image = nil;
title = _title;
image = [self currentValueForThemeAttribute:@"image"];
var title = _title,
image = _image;
[contentView setText:title];
[contentView setImage:image];