Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Port to GTK4 (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
bleakgrey authored Jul 23, 2021
1 parent dc15fd4 commit cb7a179
Show file tree
Hide file tree
Showing 161 changed files with 6,092 additions and 5,280 deletions.
Empty file modified .buildconfig
100644 → 100755
Empty file.
Empty file modified .github/FUNDING.yml
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/bug-report.md
100644 → 100755
Empty file.
Empty file modified .github/workflows/build.yml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
7 changes: 3 additions & 4 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Simple [Mastodon](https://github.com/tootsuite/mastodon) client for Linux
libxml2-dev | 2.9.10 |
libgee-0.8-dev | 0.8.5 |
libsoup2.4-dev | 2.64 |
libgtk-3-dev | 3.22 |
libhandy-1.0-dev | 1.0.0 | Will be attempted to install automatically if not present.
libsecret-1-dev | 0.20 | Optional. Used for storing accounts using Secret Service API.
libgtk-4-dev | 4.3.0 |
libadwaita-1.0-dev | 1.0.0-alpha2 | Will be attempted to install automatically if not present.
libsecret-1-dev | 0.20 |


2. Run `install.sh` in the project directory. The app will launch automatically on success.
Expand All @@ -43,4 +43,3 @@ You can always help by reporting bugs, submitting pull requests, and suggesting
* German translation by [@koyuawsmbrtn](https://github.com/koyuawsmbrtn)
* Spanish translation by [@oscfdezdz](https://github.com/oscfdezdz)
* Norwegian (Bokmål) translation by [@Octolinger](https://github.com/Octolinger)

105 changes: 54 additions & 51 deletions com.github.bleakgrey.tootle.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,57 +1,60 @@
{
"app-id": "com.github.bleakgrey.tootle",
"runtime": "org.gnome.Platform",
"sdk": "org.gnome.Sdk",
"runtime-version": "3.38",
"command": "com.github.bleakgrey.tootle",
"finish-args": [
"--share=network",
"--share=ipc",
"--socket=fallback-x11",
"--socket=wayland",
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro",
"--talk-name=ca.desrt.dconf",
"--env=DCONF_USER_CONFIG_DIR=.config/dconf"
],
"cleanup": [
"/include",
"/lib/pkgconfig",
"/man",
"/share/doc",
"/share/gtk-doc",
"/share/man",
"/share/pkgconfig",
"*.la",
"*.a"
],
"modules": [
{
"name": "libhandy",
"buildsystem": "meson",
"config-opts": [
"-Dtests=false",
"-Dexamples=false",
"-Dglade_catalog=disabled"
],
"sources": [
"app-id" : "com.github.bleakgrey.tootle",
"runtime" : "org.gnome.Platform",
"sdk" : "org.gnome.Sdk",
"runtime-version" : "40",
"command" : "com.github.bleakgrey.tootle",
"finish-args" : [
"--share=network",
"--share=ipc",
"--socket=fallback-x11",
"--socket=wayland",
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro",
"--talk-name=ca.desrt.dconf",
"--env=DCONF_USER_CONFIG_DIR=.config/dconf"
],
"cleanup" : [
"/include",
"/lib/pkgconfig",
"/man",
"/share/doc",
"/share/gtk-doc",
"/share/man",
"/share/pkgconfig",
"*.la",
"*.a"
],
"modules" : [
{
"type": "archive",
"url": "https://ftp.acc.umu.se/pub/GNOME/sources/libhandy/1.0/libhandy-1.0.3.tar.xz",
"sha256": "559bb3acc2c362488917eb72ed25bdc181f4ae26ac94d177634cc5d34c867f7a"
}
]
},
{
"name": "tootle",
"builddir": true,
"buildsystem": "meson",
"sources": [
"name" : "libadwaita",
"buildsystem" : "meson",
"builddir" : true,
"config-opts" : [
"-Dexamples=false",
"-Dtests=false"
],
"sources" : [
{
"type" : "archive",
"url" : "https://gitlab.gnome.org/GNOME/libadwaita/-/archive/594eb987c57e4d20370cc20520871f230ff02ae2/libadwaita-594eb987c57e4d20370cc20520871f230ff02ae2.tar",
"sha256" : "960d8e95864cac71be9e893d37baace82d67ecb06b3b09bd24b9fdfece9eca9c"
}
]
},
{
"type": "dir",
"path": "."
"name" : "tootle",
"builddir" : true,
"buildsystem" : "meson",
"sources" : [
{
"type" : "dir",
"path" : "."
}
]
}
]
],
"build-options" : {
"env" : { }
}
]
}
103 changes: 64 additions & 39 deletions data/app.css
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,67 +1,92 @@
.header .chip {
padding: 4px 12px;
border-radius: 4px;
border: 1px solid black;
.sidebar .badge {
padding: 2px 12px;
border-radius: 999px;
background: @accent_bg_color;
color: @text_view_bg;
}

.attachment {
border-radius: 5px;
background: rgba (150, 150, 150, 0.2);
/* .header .chip { */
/* padding: 4px 12px; */
/* border-radius: 4px; */
/* border: 1px solid black; */
/* } */

.attachment, .attachment button, flowboxchild {
padding:0px;
margin:0px;
}
.attachment .pic {
border-radius: 5px;
}
.attachment .chip {
padding: 6px;
border-radius:6px;
}

.ttl-header-button {
margin: 0px;
border-radius: 0px;
border-top: none;
border-bottom: none;
}
.ttl-header-button .title, .ttl-header-button .subtitle {
padding-left: 0px;
padding-right: 0px;
}

.padded.ttl-view {
margin: 32px 0 32px 0;
}
.ttl-view:not(.padded) .content row {
border-radius: 0px;
.attachment .osd {
padding: 6px 12px;
border-radius: 6px;
margin: 8px;
}

.ttl-action-bar .circular {
box-shadow: none;
}
/* .ttl-header-button { */
/* margin: 0px; */
/* border-radius: 0px; */
/* border-top: none; */
/* border-bottom: none; */
/* } */
/* .ttl-header-button .title, .ttl-header-button .subtitle { */
/* padding-left: 0px; */
/* padding-right: 0px; */
/* } */

.ttl-flat-button {
padding: 0px;
margin: 0px;
}

.ttl-post {
padding: 0px;
}
.ttl-thread-line {
background: @theme_fg_color;
opacity: .1;
margin-top: -8px;
margin-bottom: -8px;
}

.ttl-large-body {
font-size: 110%;
}
/* .ttl-large-body { */
/* font-size: 110%; */
/* } */

.ttl-code {
font-family: monospace;
padding: 12px;
background: rgba(150,150,150,.1);
border-radius: 6px;
}

.ttl-view .small .content row {
border-left: none;
border-right: none;
border-radius:0px;
}

.ttl-view .content row {
padding: 0px;
}

.ttl-view .large:first-child {
margin-top: 32px;
}
.ttl-view .large:last-child {
margin-bottom: 32px;
}




/*
Profile
*/

.ttl-profile-cover .header-image {
background:grey;
}
.ttl-profile-cover avatar {
border: 6px solid @theme_base_color;
background: @theme_base_color;
}
.large .header-image {
border-radius:6px 6px 0 0;
}
Empty file modified data/com.github.bleakgrey.tootle.appdata.xml.in
100644 → 100755
Empty file.
Empty file modified data/com.github.bleakgrey.tootle.desktop.in
100644 → 100755
Empty file.
10 changes: 0 additions & 10 deletions data/com.github.bleakgrey.tootle.gschema.xml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>

<enum id='com.github.bleakgrey.tootle.API.Visibility'>
<value nick='public' value='0'/>
<value nick='unlisted' value='1'/>
<value nick='private' value='2'/>
<value nick='direct' value='3'/>
</enum>

<schema path="/com/github/bleakgrey/tootle/" id="com.github.bleakgrey.tootle" gettext-domain="com.github.bleakgrey.tootle">

<key name="active-account" type="s">
Expand All @@ -22,9 +15,6 @@
<key name="work-in-background" type="b">
<default>false</default>
</key>
<key name="default-post-visibility" enum="com.github.bleakgrey.tootle.API.Visibility">
<default>'public'</default>
</key>
<key name="timeline-page-size" type="i">
<default>12</default>
</key>
Expand Down
19 changes: 16 additions & 3 deletions data/gresource.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,37 @@
<gresources>
<gresource prefix="/com/github/bleakgrey/tootle/">
<file alias="app.css">app.css</file>

<file preprocess="xml-stripblanks">icons/scalable/actions/mention-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/hashtag-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/globe-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/bell-symbolic.svg</file>

<file>gtk/help-overlay.ui</file>

<file>gtk/dropdown/icon.ui</file>
<file>gtk/dropdown/full.ui</file>

<file>ui/views/new_account.ui</file>
<file>ui/views/base.ui</file>
<file>ui/views/profile_header.ui</file>
<file>ui/views/sidebar/view.ui</file>
<file>ui/views/sidebar/account.ui</file>
<file>ui/views/sidebar/item.ui</file>
<file>ui/widgets/status.ui</file>
<file>ui/widgets/accounts_button.ui</file>
<file>ui/widgets/accounts_button_item.ui</file>
<file>ui/widgets/profile_field_row.ui</file>
<file>ui/widgets/timeline_menu.ui</file>
<file>ui/widgets/list_item.ui</file>
<file>ui/widgets/list_editor_item.ui</file>
<file>ui/widgets/attachment_slot.ui</file>
<file>ui/widgets/compose_attachment.ui</file>
<file>ui/widgets/adaptive_button.ui</file>
<file>ui/dialogs/new_account.ui</file>
<file>ui/dialogs/compose.ui</file>
<file>ui/dialogs/main.ui</file>
<file>ui/dialogs/preferences.ui</file>
<file>ui/dialogs/list_editor.ui</file>
<file>ui/menus.ui</file>

</gresource>
</gresources>

63 changes: 63 additions & 0 deletions data/gtk/dropdown/full.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<interface>
<template class="GtkListItem">
<property name="child">


<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="spacing">6</property>

<child>
<object class="GtkImage">
<property name="margin-start">6</property>
<property name="margin-end">6</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<binding name="icon_name">
<lookup name="icon_name" type="TootleInstanceAccountVisibility">
<lookup name="item">GtkListItem</lookup>
</lookup>
</binding>
</object>
</child>

<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">6</property>

<child>
<object class="GtkLabel">
<property name="xalign">0</property>
<binding name="label">
<lookup name="name" type="TootleInstanceAccountVisibility">
<lookup name="item">GtkListItem</lookup>
</lookup>
</binding>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="xalign">0</property>
<binding name="label">
<lookup name="description" type="TootleInstanceAccountVisibility">
<lookup name="item">GtkListItem</lookup>
</lookup>
</binding>
<style>
<class name="caption"/>
<class name="dim-label"/>
</style>
</object>
</child>

</object>
</child>

</object>


</property>
</template>
</interface>

Loading

0 comments on commit cb7a179

Please sign in to comment.