Skip to content

Commit

Permalink
*
Browse files Browse the repository at this point in the history
  • Loading branch information
Lains committed Apr 19, 2022
1 parent fa89e94 commit 849df70
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 34 deletions.
22 changes: 20 additions & 2 deletions data/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,27 @@ headerbar {
.content-sidebar {
background: none;
}

.content-sidebar row {
background: alpha(@view_fg_color,0.05);
border-radius: 8px;
margin-top: 3px;
padding: 6px;
}
.content-sidebar row:hover {
background: alpha(@view_fg_color,0.11);
border-radius: 8px;
margin-top: 3px;
}
.content-sidebar row:first-child {
margin-top: 6px;
}
.content-sidebar row button {
background: none;
margin: 0;
}
.content-sidebar row button:hover {
color: #ba1b1b;
}

.content {
box-shadow: none;
Expand All @@ -119,12 +131,18 @@ headerbar {
padding: 0;
margin: 0;
}

.stack-button:checked {
font-weight: 600;
background: none;
}

.view-title {
font-size: 1.5rem;
font-weight: 500;
padding: 0;
margin: 0;
}

.search-bar {
border-radius: 999px;
}
74 changes: 43 additions & 31 deletions data/ui/logrowcontent.ui
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,62 @@
<template class="KhronosLogRowContent" parent="AdwBin">
<property name="child">
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="valign">center</property>
<property name="spacing">6</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="hexpand">1</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="orientation">horizontal</property>
<property name="valign">center</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="log_label">
<property name="halign">start</property>
<property name="ellipsize">end</property>
<property name="use-markup">1</property>
<object class="GtkButton" id="delete_button">
<property name="icon-name">user-trash-symbolic</property>
<property name="valign">center</property>
<signal name="clicked" handler="on_delete_button_clicked" />
<style>
<class name="heading"/>
<class name="flat" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="log2_label">
<property name="halign">start</property>
<property name="ellipsize">end</property>
<property name="hexpand">1</property>
<property name="use-markup">1</property>
<style>
<class name="caption"/>
</style>
</object>
</child>
<child>
<object class="GtkBox" id="log_tag_holder">
<property name="halign">start</property>
<property name="hexpand">1</property>
<property name="orientation">horizontal</property>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="valign">center</property>
<property name="spacing">6</property>
<style>
<class name="tag-holder"/>
</style>
<child>
<placeholder/>
<object class="GtkLabel" id="log_label">
<property name="halign">start</property>
<property name="ellipsize">end</property>
<property name="use-markup">1</property>
<style>
<class name="view-title"/>
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="log2_label">
<property name="halign">start</property>
<property name="ellipsize">end</property>
<property name="hexpand">1</property>
<property name="use-markup">1</property>
<style>
<class name="caption"/>
</style>
</object>
</child>
<child>
<object class="GtkBox" id="log_tag_holder">
<property name="halign">start</property>
<property name="hexpand">1</property>
<property name="orientation">horizontal</property>
<property name="spacing">6</property>
<style>
<class name="tag-holder"/>
</style>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</child>
Expand Down
10 changes: 9 additions & 1 deletion src/Widgets/LogRowContent.vala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2021 Lains
* Copyright (C) 2017-2022 Lains
*
* This program is free software; you can redistribute it &&/or
* modify it under the terms of the GNU General Public
Expand Down Expand Up @@ -58,4 +58,12 @@ public class Khronos.LogRowContent : Adw.Bin {
}
}
}

construct {
}

[GtkCallback]
void on_delete_button_clicked () {
((LogListView)MiscUtils.find_ancestor_of_type<LogListView>(this)).log_removal_requested (log);
}
}

0 comments on commit 849df70

Please sign in to comment.