From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#43405: Tool bar item doesn't align to the right edge Date: Thu, 17 Sep 2020 16:43:37 +0200 Message-ID: References: <83lfhhijbl.fsf@gnu.org> <871rj9uz12.fsf@gkayaalp.com> <875z8k4wv8.fsf@posteo.net> <83pn6shjni.fsf@gnu.org> <20200911074445.GB5194@tuxteam.de> <87zh5uqdqm.fsf@mail.linkov.net> <834ko1da33.fsf@gnu.org> <87sgbloe5z.fsf@mail.linkov.net> <83een5bkja.fsf@gnu.org> <87v9ghlc5c.fsf@mail.linkov.net> <83d02pbhny.fsf@gnu.org> <87een4qi9i.fsf_-_@mail.linkov.net> <837dsw9mpu.fsf@gnu.org> <87r1r3ncwq.fsf@mail.linkov.net> <83a6xq995x.fsf@gnu.org> <831rj07c0j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5407"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43405@debbugs.gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 17 16:48:55 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIvDS-0001IW-Q3 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Sep 2020 16:48:54 +0200 Original-Received: from localhost ([::1]:33654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIvDR-0006DT-KH for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Sep 2020 10:48:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIv8l-0007zH-Sb for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 10:44:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55244) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIv8k-0006rZ-En for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 10:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kIv8k-0000mg-C6 for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 10:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Sep 2020 14:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43405 X-GNU-PR-Package: emacs Original-Received: via spool by 43405-submit@debbugs.gnu.org id=B43405.16003538272987 (code B ref 43405); Thu, 17 Sep 2020 14:44:02 +0000 Original-Received: (at 43405) by debbugs.gnu.org; 17 Sep 2020 14:43:47 +0000 Original-Received: from localhost ([127.0.0.1]:38557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIv8V-0000m7-51 for submit@debbugs.gnu.org; Thu, 17 Sep 2020 10:43:47 -0400 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:44194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIv8T-0000lo-KN for 43405@debbugs.gnu.org; Thu, 17 Sep 2020 10:43:46 -0400 Original-Received: by mail-wr1-f46.google.com with SMTP id s12so2360360wrw.11 for <43405@debbugs.gnu.org>; Thu, 17 Sep 2020 07:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=FFtEHTfaRIgf8OytDQVhYmdmwY+2H/8LXcHz4oGJOjI=; b=r/CXkWfmvEb8byJgcClwZ541qGfRSschSsmHrVqH7z4d2bYFo4Da1It2iTOPbx4dXd S+PnfTkP7BTNPrpxTeOT64//RpPFiLYOx/e/Yeswo4GoX2+dic6Yr43G7NG4kSbJ4raG VJGTggpmYJWZCVzGCuKZkGUZC+z1uY95e9xsWiNziHbazytGvt94vdGuplu8eRvWzDvQ Ji1gNgLbE5aHb+Adbq2K/Es33VZl4odEqWbWLEYAjyqSnqX6hy1yfKt6vLyTT9tLj6MR i3NQtXikjkk/2ZAINNeDnfLRYN4OxG/0wu+NfN3cEE2csTyGpXJMBQQHGUOwD9o1Sdps 9qYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=FFtEHTfaRIgf8OytDQVhYmdmwY+2H/8LXcHz4oGJOjI=; b=Ju+mqGEVLl8YnCiJW6/wNN0bL7w6REEOauWBpog6p+Pkm4hF0inOhf8RQuO3XREdi7 ErKN3dBEmVYKpNR3BnghOOhTxdUaH6SelvhYwH2qYBfmvIW7Wl6aEbtcwfItE+XPgJ+F 73++xaEF4Is3c3JKZF5QMAtHs3qjOJJuHZISY14fvlOp3IhhvoaxJrhz01vZqzf8mTx4 sqDRJti4zT6hPB29UMuiT6IPkM+nj9oGFip6ejTYlXtCmPi0ommgR7pdLrhgc4oqzQbD tg5YEnq0ZBvuK1eazSarPRbHU3qJRKnVT2MqMGA+s5Y0WPJvYzXPdUUV8VfnQOzkuzQR sxXg== X-Gm-Message-State: AOAM532ZMkb4ziShq4k2AkiXq6amqWwR/0H0V9cxqd2cG4M72xDdnlBK l0lg/D6Y9brU0HCspqDOfys= X-Google-Smtp-Source: ABdhPJyagPThm/hESAQdNMzDKLq7qILtJ8cCqa27ao1eosw7UWu0nYFFoOY9fEZ3oK1PiqVj0Xg+xQ== X-Received: by 2002:adf:81e6:: with SMTP id 93mr32395466wra.412.1600353819647; Thu, 17 Sep 2020 07:43:39 -0700 (PDT) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:99bb:88d4:2cf6:2ab9]) by smtp.gmail.com with ESMTPSA id 185sm12189819wma.18.2020.09.17.07.43.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2020 07:43:38 -0700 (PDT) In-Reply-To: <831rj07c0j.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 17 Sep 2020 16:45:16 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188201 Archived-At: >>>>> On Thu, 17 Sep 2020 16:45:16 +0300, Eli Zaretskii said: >> The GTK code just adds items to the toolbar in order. It=CA=BCs poss= ible in >> GTK to specify negative positions for toolbar items, but that just >> means 'append', not 'align to right border' as far as I can see. Eli> Thanks. Eli> If we cannot control the placement of icons on GTK, then I guess it Eli> makes little sense to add features to do this in our native tool b= ar, Eli> since most users will be unable to take advantage of it. Actually we *can* control the placement of the icons on the GTK toolbar, as it turns out. Buried in the fine print is this sentence: If the GtkToolbar child property "expand" is TRUE and the property "draw" is set to FALSE, the effect is to force all following items to the end of the toolbar. So if you do the following, all toolbar items added after this separator end up on the right: ti =3D gtk_separator_tool_item_new (); gtk_tool_item_set_expand (ti, true); gtk_separator_tool_item_set_draw (GTK_SEPARATOR_TOOL_ITEM (ti), true); gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, j); It does produce an ugly empty patch in the middle of the toolbar that=CA=BCs a different colour though. The other way to do this would be to add toolbar items at specific positions in the toolbar, but I couldn't find an api that answered the question "how many items of size x can I add before I reach the right border of the window" (and then we=CA=BCd have to recalculate the positions if the frame changes size). Robert