0

カスタム ツールバーをアプリケーションに追加しようとしました。ウィンドウの下部に配置するために、もう 1 つウィンドウを作成し、ツールバーを追加しました。

var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
    contentView = [theWindow contentView],
    bounds = [contentView bounds];
[contentView setBackgroundColor:[CPColor colorWithHexString:@"cecece"]];

///second window to place the toolbar at the bottom
var w2 = [[CPPanel alloc] initWithContentRect:CGRectMake(0, CGRectGetHeight(bounds) - _settings.toolbarSize,
                                                          CGRectGetWidth(bounds), _settings.toolbarSize)
                           styleMask: CPBorderlessWindowMask]
var c2 = [w2 contentView]
[c2 setBackgroundColor:[CPColor colorWithHexString:@"ff0000"]];

///a toolbar
toolbar = [[Toolbar alloc] initWithWindow:w2];

///show window
[theWindow orderFront:self];
[w2 orderFront:self];

Cappuccino 0.8.1 では正常に動作しましたが、最新のものでは動作しません。必要に応じてツールバーを設定するtheWindowか、それを使用して初期化w2する場合にのみCPBorderlessBridgeWindowMaskレンダリングします。

この動作の理由は何ですか?

4

0 に答える 0