Replace window realm frame decorations with nicer label decorations
This commit is contained in:
@ -1,15 +1,11 @@
|
||||
import Clutter from 'gi://Clutter'
|
||||
import Gio from 'gi://Gio'
|
||||
import Meta from 'gi://Meta'
|
||||
import Shell from 'gi://Shell'
|
||||
import St from 'gi://St'
|
||||
|
||||
import * as Main from '../main.js';
|
||||
import * as RealmIndicator from './realmIndicator.js';
|
||||
import * as RealmSwitcher from './realmSwitcher.js';
|
||||
import * as Lightbox from '../lightbox.js';
|
||||
import * as RealmSearchProvider from './realmSearchProvider.js';
|
||||
import * as RealmWindowFrame from './realmWindowFrame.js';
|
||||
import * as RealmLabels from './realmLabels.js';
|
||||
|
||||
export const RealmManager = class {
|
||||
constructor() {
|
||||
@ -39,17 +35,20 @@ export const RealmManager = class {
|
||||
});
|
||||
|
||||
this._switchAnimation = new RealmSwitcher.ContextSwitchAnimationController(this._realmIndicator);
|
||||
this.labelManager = new RealmLabels.RealmLabelManager();
|
||||
}
|
||||
|
||||
if (Main.overview._overview) {
|
||||
this._searchResults = Main.overview._overview.controls._searchController._searchResults;
|
||||
this._searchProvider = new RealmSearchProvider.RealmSearchProvider();
|
||||
this._searchProvider.createResultDisplay(this._searchResults);
|
||||
this._searchResults._registerProvider(this._searchProvider);
|
||||
createRealmLabelForApp(app) {
|
||||
let realmName = app.get_realm_name();
|
||||
if (this.labelManager.appIconLabelsEnabled() && realmName) {
|
||||
return this.labelManager.createAppIconLabelForRealm(realmName);
|
||||
} else {
|
||||
log("Not creating search provider because Main.overview._overview does not exist");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
this._frameManager = new RealmWindowFrame.WindowFrameManager();
|
||||
appIconLabelsEnabled() {
|
||||
return this.labelManager.appIconLabelsEnabled();
|
||||
}
|
||||
|
||||
animateSwitch(from, to, onComplete) {
|
||||
@ -61,5 +60,4 @@ export const RealmManager = class {
|
||||
if (!popup.show(binding.is_reversed(), binding.get_name(), binding.get_mask()))
|
||||
popup.fadeAndDestroy();
|
||||
}
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user