~eliasnaur/gio

2

[PATCH] Use theme.TextSize in material.Editor instead of default value

Werner Laurensse
Details
Message ID
<66B0A88C-6DF5-4E4E-B0DD-8FE9B5069FF1@alman.ax>
DKIM signature
missing
Download raw message
I've tried to email this patch before with git email but I don't think it arrived.

Index: widget/material/editor.go
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- widget/material/editor.go	(revision 1defd4e759271d9693831ecd5fd974fc468954b9)
+++ widget/material/editor.go	(date 1573066773001)
@@ -9,7 +9,6 @@
 	"gioui.org/op"
 	"gioui.org/op/paint"
 	"gioui.org/text"
-	"gioui.org/unit"
 	"gioui.org/widget"
 )
 
@@ -28,7 +27,7 @@
 func (t *Theme) Editor(hint string) Editor {
 	return Editor{
 		Font: text.Font{
-			Size: unit.Sp(16),
+			Size: t.TextSize,
 		},
 		Color:     t.Color.Text,
 		shaper:    t.Shaper,
Details
Message ID
<BY9KLJWYSH4D.1BNH8KM8U6Z05@toolbox>
In-Reply-To
<66B0A88C-6DF5-4E4E-B0DD-8FE9B5069FF1@alman.ax> (view parent)
DKIM signature
pass
Download raw message
On Wed Nov 6, 2019 at 8:02 PM Werner Laurensse wrote:
> I've tried to email this patch before with git email but I don't think it arrived.
> 
> Index: widget/material/editor.go
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- widget/material/editor.go	(revision 1defd4e759271d9693831ecd5fd974fc468954b9)
> +++ widget/material/editor.go	(date 1573066773001)
> @@ -9,7 +9,6 @@
>  	"gioui.org/op"
>  	"gioui.org/op/paint"
>  	"gioui.org/text"
> -	"gioui.org/unit"
>  	"gioui.org/widget"
>  )
>  
> @@ -28,7 +27,7 @@
>  func (t *Theme) Editor(hint string) Editor {
>  	return Editor{
>  		Font: text.Font{
> -			Size: unit.Sp(16),
> +			Size: t.TextSize,
>  		},
>  		Color:     t.Color.Text,
>  		shaper:    t.Shaper,

git am is sensitive to the formatting of email patches, so this doesn't apply cleanly.
If you can, create a new respository on git.sr.ht, push your changes there and then
use the "send email" feature on the front page of your repository.

As for the patch itself, use the convention "package: change", so:

	widget/material: use Theme.TextSize in Editor

Finally, remember to sign-off your change as described in gioui.org/doc/contribute.
Signing off changes is the minimal "paperwork" that makes your intent to release
your changes under the Gio licenses clear.
Details
Message ID
<BY9UQ4PDUSUI.5E6B2VNFNMM2@toolbox>
In-Reply-To
<66B0A88C-6DF5-4E4E-B0DD-8FE9B5069FF1@alman.ax> (view parent)
DKIM signature
pass
Download raw message
Merged in gioui.org/commit/9c0fc631bd3a6f9cdfbe4ce4427146b9669bed6a