Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions data/Application.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
entry.flat {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From #275 (comment):

That's true, but Gtk.Entry has other classes that still show the focus or active border when the input is focused.

This may be due to the following lines? Isn't there any way to just remove the focused style class and avoid re-implementing the entry.flat class here? 🤔

https://github.com/elementary/stylesheet/blob/b92637c9608a2455060b89fe17c8be98ffaaf355/src/gtk-4.0/widgets/_entries.scss#L21-L23

border: none;
box-shadow: none;
}
6 changes: 6 additions & 0 deletions data/io.elementary.calculator.gresource.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/io/elementary/calculator">
<file compressed="true">Application.css</file>
</gresource>
</gresources>
5 changes: 5 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ i18n.merge_file(
install: true,
install_dir: get_option('datadir') / 'metainfo',
)

css_gresource = gnome.compile_resources(
'gresource_css',
'io.elementary.calculator.gresource.xml'
)
1 change: 1 addition & 0 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public class PantheonCalculator.MainWindow : Gtk.ApplicationWindow {
valign = Gtk.Align.FILL
};
entry.add_css_class (Granite.STYLE_CLASS_H2_LABEL);
entry.add_css_class (Granite.STYLE_CLASS_FLAT);

button_calc = new Button ("=") {
tooltip_text = _("Calculate Result")
Expand Down
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ executable(
'Core/Token.vala',
'Core/Scanner.vala',
'Core/Evaluation.vala',
css_gresource,
dependencies: [
core_deps,
dependency('gtk4'),
Expand Down
Loading