From unknown Wed Jun 18 00:15:43 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#9176 <9176@debbugs.gnu.org> To: bug#9176 <9176@debbugs.gnu.org> Subject: Status: [PATCH] 24.0.50: Tooltip windows on NextStep are sized incorrectly Reply-To: bug#9176 <9176@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:15:43 +0000 retitle 9176 [PATCH] 24.0.50: Tooltip windows on NextStep are sized incorre= ctly reassign 9176 emacs submitter 9176 Alp Aker severity 9176 normal tag 9176 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 27 15:10:25 2011 Received: (at submit) by debbugs.gnu.org; 27 Jul 2011 19:10:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qm9Uv-00072D-4i for submit@debbugs.gnu.org; Wed, 27 Jul 2011 15:10:25 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qlo09-0006iH-Hx for submit@debbugs.gnu.org; Tue, 26 Jul 2011 16:13:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qlo03-0002i4-6R for submit@debbugs.gnu.org; Tue, 26 Jul 2011 16:13:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:59909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qlo03-0002i0-4x for submit@debbugs.gnu.org; Tue, 26 Jul 2011 16:13:07 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qlo02-0005wn-6M for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2011 16:13:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qlo00-0002hi-V2 for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2011 16:13:06 -0400 Received: from mail-qw0-f41.google.com ([209.85.216.41]:36193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qlo00-0002hX-KU for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2011 16:13:04 -0400 Received: by qwa26 with SMTP id 26so620062qwa.0 for ; Tue, 26 Jul 2011 13:13:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=/fu4q3oF8CJvXn4Fx1RUQU1RS5mqZEwNX1pPwXHqE1c=; b=Tb8/ouDJy1Ak7VvRVADTSE4LyVxJSJdlTn8nmNEdkIp7zZpNSc2sGtkKK5JBitiwF5 4dQRraCXGSEunm6qvCOmT3NpJo4SQkxBpce/TNzngp0mww1TxKAng7hPwA+4HNdo6h0v yVKUB9d8eEPru2vU0isIMpc6QZUsYQP3cCZ5A= MIME-Version: 1.0 Received: by 10.229.2.160 with SMTP id 32mr4543856qcj.280.1311711184254; Tue, 26 Jul 2011 13:13:04 -0700 (PDT) Received: by 10.229.250.132 with HTTP; Tue, 26 Jul 2011 13:13:04 -0700 (PDT) Date: Tue, 26 Jul 2011 16:13:04 -0400 Message-ID: Subject: [PATCH] 24.0.50: Tooltip windows on NextStep are sized incorrectly From: Alp Aker To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 27 Jul 2011 15:10:22 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.5 (-----) A small aesthetic issue: Currently on NS the dimensions of tooltip windows are determined by a small hack that introduces superfluous padding at the bottom and left (typically 10 pixels or more). The patch below sizes tooltip windows precisely. I also took the liberty of making another purely aesthetic change. Currently on NS tooltip windows have bezels and no shadows. The standard appearance on Mac is to have shadows and no bezels. So I changed the implementation to use the default appearance as well. 2011-07-26 Alp Aker * nsmenu.m (EmacsTooltip -init): Remove bezels and add shadows to tooltip windows. (-setText): Size tooltip dimensions precisely to contents. === modified file 'src/nsmenu.m' --- src/nsmenu.m 2011-07-08 10:04:23 +0000 +++ src/nsmenu.m 2011-07-26 19:50:47 +0000 @@ -1228,8 +1228,8 @@ [textField setEditable: NO]; [textField setSelectable: NO]; - [textField setBordered: YES]; - [textField setBezeled: YES]; + [textField setBordered: NO]; + [textField setBezeled: NO]; [textField setDrawsBackground: YES]; win = [[NSWindow alloc] @@ -1237,6 +1237,7 @@ styleMask: 0 backing: NSBackingStoreBuffered defer: YES]; + [win setHasShadow: YES]; [win setReleasedWhenClosed: NO]; [win setDelegate: self]; [[win contentView] addSubview: textField]; @@ -1257,17 +1258,15 @@ - (void) setText: (char *)text { NSString *str = [NSString stringWithUTF8String: text]; - NSRect r = [textField frame]; - NSSize textSize = [str sizeWithAttributes: - [NSDictionary dictionaryWithObject: [[textField font] screenFont] - forKey: NSFontAttributeName]]; - NSSize padSize = [[[textField font] screenFont] - boundingRectForFont].size; - - r.size.width = textSize.width + padSize.width/2; - r.size.height = textSize.height + padSize.height/2; + NSRect r = [textField frame]; + NSSize tooltipDims; + + [textField setStringValue: str]; + tooltipDims = [[textField cell] cellSize]; + + r.size.width = tooltipDims.width; + r.size.height = tooltipDims.height; [textField setFrame: r]; - [textField setStringValue: str]; } - (void) showAtX: (int)x Y: (int)y for: (int)seconds From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 28 14:31:15 2011 Received: (at 9176) by debbugs.gnu.org; 28 Jul 2011 18:31:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QmVMX-0003QX-QD for submit@debbugs.gnu.org; Thu, 28 Jul 2011 14:31:14 -0400 Received: from vm-emlprdomr-06.its.yale.edu ([130.132.50.147]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QmVMV-0003QQ-Mq for 9176@debbugs.gnu.org; Thu, 28 Jul 2011 14:31:12 -0400 Received: from furball ([128.36.14.95]) (authenticated bits=0) by vm-emlprdomr-06.its.yale.edu (8.14.4/8.14.4) with ESMTP id p6SIVAxq004193 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 28 Jul 2011 14:31:10 -0400 From: Chong Yidong To: Alp Aker Subject: Re: bug#9176: [PATCH] 24.0.50: Tooltip windows on NextStep are sized incorrectly References: Date: Thu, 28 Jul 2011 14:31:10 -0400 In-Reply-To: (Alp Aker's message of "Tue, 26 Jul 2011 16:13:04 -0400") Message-ID: <87r55al0k1.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.147 X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 9176 Cc: 9176@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Alp Aker writes: > A small aesthetic issue: Currently on NS the dimensions of tooltip > windows are determined by a small hack that introduces superfluous > padding at the bottom and left (typically 10 pixels or more). The > patch below sizes tooltip windows precisely. > > I also took the liberty of making another purely aesthetic change. > Currently on NS tooltip windows have bezels and no shadows. The > standard appearance on Mac is to have shadows and no bezels. So I > changed the implementation to use the default appearance as well. Thanks, applied. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 28 14:31:24 2011 Received: (at control) by debbugs.gnu.org; 28 Jul 2011 18:31:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QmVMi-0003Qs-2L for submit@debbugs.gnu.org; Thu, 28 Jul 2011 14:31:24 -0400 Received: from vm-emlprdomr-06.its.yale.edu ([130.132.50.147]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QmVMh-0003Qm-39 for control@debbugs.gnu.org; Thu, 28 Jul 2011 14:31:23 -0400 Received: from furball ([128.36.14.95]) (authenticated bits=0) by vm-emlprdomr-06.its.yale.edu (8.14.4/8.14.4) with ESMTP id p6SIVLSa004266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Thu, 28 Jul 2011 14:31:22 -0400 From: Chong Yidong To: control@debbugs.gnu.org Subject: close 9176 Date: Thu, 28 Jul 2011 14:31:21 -0400 Message-ID: <8739hqtfye.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.147 X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) close 9176 thanks From unknown Wed Jun 18 00:15:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 26 Aug 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator