[dash] Move BackLink to CSS
The previous commit 626f679947
broke the back links on
search drilldown.
https://bugzilla.gnome.org/show_bug.cgi?id=601413
This commit is contained in:
parent
1b75ae0184
commit
af35dea019
@ -16,7 +16,6 @@ imagesdir = $(pkgdatadir)/images
|
||||
dist_images_DATA = \
|
||||
add-workspace.svg \
|
||||
app-well-glow.png \
|
||||
back.svg \
|
||||
close.svg \
|
||||
close-black.svg \
|
||||
info.svg \
|
||||
@ -30,7 +29,8 @@ dist_theme_DATA = \
|
||||
theme/scroll-button-down-hover.png \
|
||||
theme/scroll-button-up.png \
|
||||
theme/scroll-button-up-hover.png \
|
||||
theme/scroll-vhandle.png
|
||||
theme/scroll-vhandle.png \
|
||||
theme/section-back.svg
|
||||
|
||||
schemadir = @GCONF_SCHEMA_FILE_DIR@
|
||||
schema_DATA = gnome-shell.schemas
|
||||
|
@ -101,12 +101,24 @@ StScrollBar StButton#vhandle:hover
|
||||
.section-header-inner {
|
||||
border: 1px solid #000000;
|
||||
padding: 0px 4px;
|
||||
spacing: 4px;
|
||||
}
|
||||
|
||||
.section-text-content {
|
||||
padding: 4px 0px;
|
||||
}
|
||||
|
||||
.section-header-back {
|
||||
padding: 0px 4px 0px 0px;
|
||||
border-right: 1px solid #262626;
|
||||
}
|
||||
|
||||
.section-header-back-image {
|
||||
background-image: url("section-back.svg");
|
||||
width: 12px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.section-count {
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@ -403,21 +403,9 @@ function BackLink() {
|
||||
|
||||
BackLink.prototype = {
|
||||
_init : function () {
|
||||
this.actor = new Shell.ButtonBox({ orientation: Big.BoxOrientation.HORIZONTAL,
|
||||
padding_right: DEFAULT_PADDING,
|
||||
padding_left: DEFAULT_PADDING,
|
||||
reactive: true,
|
||||
x_align: Big.BoxAlignment.CENTER,
|
||||
y_align: Big.BoxAlignment.CENTER,
|
||||
border_right: SECTION_BORDER,
|
||||
border_color: SECTION_BORDER_COLOR });
|
||||
|
||||
let backIconUri = "file://" + global.imagedir + "back.svg";
|
||||
let backIcon = Shell.TextureCache.get_default().load_uri_sync(Shell.TextureCachePolicy.FOREVER,
|
||||
backIconUri,
|
||||
12,
|
||||
16);
|
||||
this.actor.append(backIcon, Big.BoxPackFlags.NONE);
|
||||
this.actor = new St.Button({ style_class: "section-header-back",
|
||||
reactive: true });
|
||||
this.actor.set_child(new St.Bin({ style_class: "section-header-back-image" }));
|
||||
}
|
||||
}
|
||||
|
||||
@ -442,13 +430,20 @@ SectionHeader.prototype = {
|
||||
this._onStyleChanged();
|
||||
}));
|
||||
|
||||
this.backLink = new BackLink();
|
||||
this._innerBox.add(this.backLink.actor);
|
||||
this.backLink.actor.hide();
|
||||
this.backLink.actor.connect('clicked', Lang.bind(this, function (actor) {
|
||||
this.emit('back-link-activated');
|
||||
}));
|
||||
|
||||
let textBox = new St.BoxLayout({ style_class: "section-text-content" });
|
||||
this.text = new St.Label({ style_class: "section-title",
|
||||
text: title });
|
||||
textBox.add(this.text, { x_align: St.Align.START });
|
||||
|
||||
this.countText = new St.Label({ style_class: "section-count" });
|
||||
textBox.add(this.countText, { x_align: St.Align.END });
|
||||
textBox.add(this.countText, { expand: true, x_fill: false, x_align: St.Align.END });
|
||||
this.countText.hide();
|
||||
|
||||
this._innerBox.add(textBox, { expand: true });
|
||||
|
Loading…
Reference in New Issue
Block a user