Update Main.hs

This commit is contained in:
千住柱間 2024-12-13 14:33:11 +00:00
commit 9ca837f52f

19
Main.hs
View file

@ -1,7 +1,6 @@
-- Copyright © 2024 Hashirama Senju
{-# LANGUAGE OverloadedStrings, OverloadedLabels, ImplicitParams #-}
import Control.Monad (void)
import System.Environment (getArgs, getProgName)
@ -23,6 +22,22 @@ activate app = do
#spacing := 20 ]
#append box toolbar
searchBar <- new Gtk.Box [#orientation := Gtk.OrientationHorizontal, #spacing := 20,
#baselinePosition := Gtk.BaselinePositionTop,
#halign := Gtk.AlignFill,
#hexpand := True, #widthRequest := 300]
searchEntry <- new Gtk.Entry []
#setHexpand searchEntry True -- expand the searchEntry to fill the width
searchButton <- new Gtk.Button [#label := "Search"]
#append searchBar searchEntry
#append searchBar searchButton
#append box searchBar
-----------
window <- new Gtk.ApplicationWindow [#application := app,
@ -41,3 +56,5 @@ main = do
void $ #run app (Just $ progName : args)