-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial port to GTK4 * Fix range slider but sliding on it is still broken * Fix header bar and most of the ui except the menu popup and about window * Fix about dialog and menu popup except popup autohide and About button text centered issue * Fix all issues and deprecation except About button text centered issue and styling deprecations, unref, unparent warnings * Bump version and update debian and rpm dependencies
- Loading branch information
Showing
16 changed files
with
141 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/bash | ||
gcc -g -pthread `pkg-config --cflags gtk+-3.0` -o build/app.debug src/main.c `pkg-config --libs gtk+-3.0` -l ddcutil | ||
gcc -g -pthread `pkg-config --cflags gtk4 libadwaita-1` -o build/app.debug src/main.c `pkg-config --libs gtk4 libadwaita-1` -l ddcutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/bash | ||
gcc -pthread `pkg-config --cflags gtk+-3.0` -o build/app src/main.c `pkg-config --libs gtk+-3.0` -l ddcutil | ||
gcc -pthread `pkg-config --cflags gtk4 libadwaita-1` -o build/app src/main.c `pkg-config --libs gtk4 libadwaita-1` -l ddcutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Package: luminance | ||
Version: 1.0.3 | ||
Version: 1.1.0 | ||
Architecture: amd64 | ||
Maintainer: Swapnil Devesh <[email protected]> | ||
Homepage: https://github.com/sidevesh/Luminance | ||
Description: A simple GTK application to control brightness of displays including external displays supporting DDC/CI | ||
License: GPL-3.0 | ||
Depends: libgtk-3-0, ddcutil, libddcutil4 | ||
Depends: libgtk-4-1, libadwaita-1-0, ddcutil, libddcutil4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
#include <gtk/gtk.h> | ||
#include "../constants/main.c" | ||
|
||
|
||
static char* format_brightness_value(GtkScale *scale, gdouble value, gpointer data) { | ||
return g_strdup_printf(" %d%%", (int)value); | ||
} | ||
|
||
GtkWidget* get_display_brightness_scale(gdouble last_value, gdouble max_value) { | ||
GtkWidget *scale = gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL, 0, max_value, 1); | ||
gtk_range_set_value(GTK_RANGE(scale), last_value); | ||
|
||
gtk_scale_set_draw_value(GTK_SCALE(scale), TRUE); | ||
gtk_scale_set_value_pos(GTK_SCALE(scale), GTK_POS_RIGHT); | ||
gtk_scale_set_format_value_func(GTK_SCALE(scale), format_brightness_value, NULL, NULL); | ||
gtk_widget_set_halign(scale, GTK_ALIGN_FILL); | ||
gtk_widget_set_hexpand(scale, TRUE); | ||
gtk_widget_set_valign(scale, GTK_ALIGN_START); | ||
gtk_widget_set_halign(scale, 0.0); | ||
gtk_widget_set_margin_start(scale, MARGIN_UNIT / 4); | ||
gtk_widget_set_margin_end(scale, MARGIN_UNIT / 2); | ||
gtk_widget_set_margin_bottom(scale, MARGIN_UNIT); | ||
gtk_range_set_value(GTK_RANGE(scale), last_value); | ||
|
||
return scale; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.