no more submodule

This commit is contained in:
2024-09-15 22:40:48 +02:00
parent df3b8a3135
commit 0234b33671
5804 changed files with 943618 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
using System;
using Gtk;
namespace Samples
{
[Section(ContentType = typeof(StyleContext), Category = Category.Miscellaneous)]
class StyleContextSection : ListSection
{
public StyleContextSection()
{
var btn = new Button() { Label = "Press me" };
btn.Clicked += OnBtnClicked;
AddItem("Press button to output style context properties:", btn);
}
private void OnBtnClicked(object sender, EventArgs e)
{
var styleCtx = ((Button)sender).StyleContext;
var props = new[] { "padding-left", "padding-right", "padding-top", "padding-bottom", "min-width", "min-height", "color", "background-color", "font-size", "font-style" };
foreach (var prop in props)
{
GLib.Value val = styleCtx.GetProperty(prop, styleCtx.State);
string msg = string.Format("Property {0}, type {1}, value {2}", prop, val.Val.GetType().Name, val.Val.ToString());
ApplicationOutput.WriteLine(msg);
}
}
}
}