From 0bb3cf2415f9d49c3ed5a10883976a64e9fe2d51 Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 9 Apr 2024 13:56:09 +0300 Subject: [PATCH] add placeholder text --- src/Entry/Address.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Entry/Address.php b/src/Entry/Address.php index 46e084b1..987f0b35 100644 --- a/src/Entry/Address.php +++ b/src/Entry/Address.php @@ -9,12 +9,17 @@ class Address public \GtkEntry $entry; public function __construct( - ?string $value = null + ?string $text = null, + ?string $placeholder = 'URL or any search term...' ) { $this->entry = new \GtkEntry(); $this->entry->set_text( - $value + $text + ); + + $this->entry->set_placeholder_text( + $placeholder ); $this->entry->set_max_length(