Codebase list gnome-sound-recorder / c9382b8
port to Adw.Application Bilal Elmoussaoui 2 years ago
4 changed file(s) with 56 addition(s) and 68 deletion(s). Raw diff Collapse all Expand all
+0
-53
data/application.css less more
0 .recorder-time-label {
1 font-size: 32pt;
2 font-weight: 300;
3 }
4
5 @keyframes clocks-blink {
6 0% { color: @theme_text_color; }
7 100% { color: #FF0000; }
8 }
9
10 .recorder-time-label.paused {
11 color: #FF0000;
12 animation-name: clocks-blink;
13 animation-iteration-count: infinite;
14 animation-timing-function: cubic-bezier(1.0,0,0,1.0);
15 animation-duration: 1s;
16 }
17
18 button.large {
19 padding: 12px;
20 }
21
22 list row label.title {
23 font-weight: bold;
24 }
25
26 list row label.subtitle {
27 font-size: smaller;
28 }
29
30 list row {
31 margin-top: 0;
32 margin-bottom: 0;
33 border-radius: 0;
34 }
35
36 list row:first-child {
37 border-top-left-radius: 8px;
38 border-top-right-radius: 8px;
39 }
40
41 list row:last-child {
42 border-bottom-left-radius: 8px;
43 border-bottom-right-radius: 8px;
44 }
45
46 list row:first-child.expanded {
47 margin-top:0;
48 }
49
50 list row:last-child.expanded {
51 margin-bottom: 0;
52 }
00 <?xml version="1.0" encoding="UTF-8"?>
11 <gresources>
22 <gresource prefix="/org/gnome/SoundRecorder">
3 <file>application.css</file>
3 <file>style.css</file>
44 <file>ui/recorder.ui</file>
55 <file>ui/row.ui</file>
66 <file>ui/window.ui</file>
0 .recorder-time-label {
1 font-size: 32pt;
2 font-weight: 300;
3 }
4
5 @keyframes clocks-blink {
6 0% { color: @theme_text_color; }
7 100% { color: #FF0000; }
8 }
9
10 .recorder-time-label.paused {
11 color: #FF0000;
12 animation-name: clocks-blink;
13 animation-iteration-count: infinite;
14 animation-timing-function: cubic-bezier(1.0,0,0,1.0);
15 animation-duration: 1s;
16 }
17
18 button.large {
19 padding: 12px;
20 }
21
22 list row label.title {
23 font-weight: bold;
24 }
25
26 list row label.subtitle {
27 font-size: smaller;
28 }
29
30 list row {
31 margin-top: 0;
32 margin-bottom: 0;
33 border-radius: 0;
34 }
35
36 list row:first-child {
37 border-top-left-radius: 8px;
38 border-top-right-radius: 8px;
39 }
40
41 list row:last-child {
42 border-bottom-left-radius: 8px;
43 border-bottom-right-radius: 8px;
44 }
45
46 list row:first-child.expanded {
47 margin-top:0;
48 }
49
50 list row:last-child.expanded {
51 margin-bottom: 0;
52 }
2525
2626 const { Window } = imports.window;
2727
28 var Application = GObject.registerClass(class Application extends Gtk.Application {
28 var Application = GObject.registerClass(class Application extends Adw.Application {
2929 _init() {
30 super._init({ application_id: pkg.name });
30 super._init({ application_id: pkg.name, resource_base_path: '/org/gnome/SoundRecorder/' });
3131 GLib.set_application_name(_('Sound Recorder'));
3232 GLib.set_prgname('gnome-sound-recorder');
3333 GLib.setenv('PULSE_PROP_media.role', 'production', 1);
8888 log('Sound Recorder (%s)'.format(pkg.name));
8989 log('Version: %s'.format(pkg.version));
9090
91 let provider = new Gtk.CssProvider();
92 provider.load_from_resource('/org/gnome/SoundRecorder/application.css');
93
94 let display = Gdk.Display.get_default();
95 Gtk.StyleContext.add_provider_for_display(display,
96 provider,
97 Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
98
99 Gtk.IconTheme.get_for_display(display).add_resource_path('/org/gnome/SoundRecorder/icons/');
100
101 this.set_resource_base_path('/org/gnome/SoundRecorder/');
102 Adw.init();
10391 Gst.init(null);
10492
10593 try {