Commit e9d958b5 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

Add a dummy app name/description to mimic GS

We could use AppstreamGlib here to get the app info using their id
but that's too much work for now. appstream-glib-rs is now a thing, might revisit soon"
parent 621eedb5
Pipeline #103721 passed with stages
in 16 minutes and 12 seconds
......@@ -13,10 +13,12 @@ button:disabled .errors-count {
button:disabled label {
color: #C0BFBC;
}
.head-title{
font-size: 24px;
font-weight: bold;
.head{
font-size: 40px;
font-weight:bolder;
}
.summary{
font-size: 16px;
}
.banner{
......
......@@ -17,9 +17,57 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="margin">40</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Application</property>
<style>
<class name="head" />
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Application Summary</property>
<style>
<class name="summary" />
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<style>
<class name="banner"/>
</style>
......
......@@ -2,22 +2,14 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<menu id="popover_menu">
<section>
<item>
<attribute name="label" translatable="yes">_New Window</attribute>
<attribute name="action">app.new-window</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_About Banner Viewer</attribute>
<attribute name="action">app.about</attribute>
</item>
</section>
<item>
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_About Banner Viewer</attribute>
<attribute name="action">app.about</attribute>
</item>
</menu>
</interface>
......
......@@ -93,7 +93,6 @@ impl Application {
about_dialog.show();
});
self.app.add_action(&simple_action);
self.app.set_accels_for_action("app.about", &["<primary>comma"]);
}
fn setup_signals(&self) {
......
......@@ -44,10 +44,11 @@ impl Banner {
source_buffer.set_highlight_syntax(true);
undo_manager.begin_not_undoable_action();
source_buffer.set_text(&self.banner.css);
source_buffer.set_text(&self.banner.css.trim());
undo_manager.end_not_undoable_action();
source_view.set_monospace(true);
source_view.set_indent_width(2);
let scheme = sourceview::StyleSchemeManager::get_default().map_or(None, |scm| scm.get_scheme("solarized-light")).unwrap();
source_buffer.set_style_scheme(Some(&scheme));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment