From patchwork Sat Mar 11 11:42:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Dobriyan X-Patchwork-Id: 68101 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp246688wrd; Sat, 11 Mar 2023 04:01:25 -0800 (PST) X-Google-Smtp-Source: AK7set+nk+uuqk+8cmf+ng5VgKDb4IAyVEQEZ5pjvrUpT0FOjfdked4seAHmhde7O25J4p0BULdS X-Received: by 2002:a17:90b:3145:b0:23a:6ecb:3073 with SMTP id ip5-20020a17090b314500b0023a6ecb3073mr28743346pjb.21.1678536085606; Sat, 11 Mar 2023 04:01:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678536085; cv=none; d=google.com; s=arc-20160816; b=FvHSoY5yu6ohzfdl5UxGDCaoWHlIJrx2OKutjD7XyE6E/51hXT/Xp4jhcQXfvP3S1J 4CXcaO373JG5S/CIrjjYp2HlWGFQCM1U38DtsFwRy3QsqSIy3p7/ixSuz+fpPcnd3euE evo3TDLR54d+qyP0ByRn0SmSD8CJSF9TVjZRcCNdWKYNoXuIKCGCY7Qyce/MZzCsBNwu eA8QVba9L4TOa+RFw8z6IKl+o5hpOQ5E/AI2u1pkCJrU2QkqtwdupV1P9xahQX7P5P2Y Uwk2fW7J+BHoZfuT0iyGXvRXOY6Dhi8Pnx2ubXu1saPHTmc9cNqXRf/DsZtOwSRWCsg5 7GGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=r5l8Vloh1WtxxZ7hjoUpeR2cdX5vK/Amr5YfCGK/bTg=; b=uMUuU2Fu6v+KSnIDK2pcnaez/YdvXujyWy7OtKUwNS6Vyk7vyPFRgjYNl4UwOnR4aU pH6w4FK1WSyDxxDaRYPapqSdr56iZd/Nd0DN2FU2ZFI6bYCY6sw4gHuxucl4LFnH9n6a 55xLDa3G7Gq/yqQhIAbmPbFnuFCvB+EFF4fBRBx2HY92DwfBInSatJJYhSrMWXrmXlyD /bHyU0Z/2+jX86T/R8U2ESXvJAg39+ZMB1FTQH263wEqVhebJ1fOGS/re2NKLEtWgR2t DbF1X6bwY/kQt/5CKuXxPgEJ4jcrAhNK4gvkUpgJmmWXA51rAvVIGycwZnf98G6WhLtO 8HaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XyJyjep1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bk18-20020a17090b081200b00233c7c617e7si2007551pjb.101.2023.03.11.04.01.10; Sat, 11 Mar 2023 04:01:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XyJyjep1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230002AbjCKLnQ (ORCPT + 99 others); Sat, 11 Mar 2023 06:43:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbjCKLnM (ORCPT ); Sat, 11 Mar 2023 06:43:12 -0500 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5274A196A0; Sat, 11 Mar 2023 03:43:07 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id g10so2019609eda.1; Sat, 11 Mar 2023 03:43:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678534986; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=r5l8Vloh1WtxxZ7hjoUpeR2cdX5vK/Amr5YfCGK/bTg=; b=XyJyjep1502rKoHisv84RKSxorpOwvMZE64X1+drFByHBsAgZSx5HFVFqH5yRO8d0F Z0NRE8S9eZ6eNGDRMxLD8bqJBZoxxdcxsM8t3AtYtuJKtx0IqMegdqcJm8msbRTuP3ko IW0IIfkHBMQxDC/ndPw8yy5+xTVxT6yKE0Q3JArEZHwBO4Fe5UzTAfnUY/FLDQGtGYXZ POpgV9Sv2rTmc1zmjxznopZGrM+kqO2+CJKz0rgT66N4jMenRxj/sR3xle4yclpvwtA4 6+vH2Z1TrMnDCHYqI9lrSd6eJ5b4U/TgOZrga4DGQm1/UXdiNJqwIqYnq3iZnW5Q6npI mVmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678534986; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=r5l8Vloh1WtxxZ7hjoUpeR2cdX5vK/Amr5YfCGK/bTg=; b=p6GFMYg00lFLUiCY1WdS9RyMp6vqOZ2ReicF4zcbaJrgda81KIt6MRAH7jmNlYOOlZ FX1qVnzlpPmzIAg8lvOxsBD2e/Mnyh/dgkPyKzWJR3N71pzC1M/HnbSySxHW8HTzTo66 dY1Q9BFBfGI/9VPAzm/VQdbO2wgPXxj7Jyqu9NU6LKPH3GszgNbe3p9EfMHYDDAoJqWW 4cQ6UIWFoP/4LMcftZD2o/22SqKow3BVzc18R3Ji++oGyovBM0j9knD1tYDRRKRp0fP8 Uo+D3p30y79hayy9qOIXAX/IN/aT370c0fmOctx1DRw3mDP5IVZ1FRQauZwlizq6pHMH KvkA== X-Gm-Message-State: AO0yUKXuIonH35W2Isc/3MJXFOfWwvz6Y2n7a8RSGjfWRcgg+y1o7Wf6 TLCqcrxE6mbBJIPG6Fv5ow== X-Received: by 2002:a17:907:7b8d:b0:8b2:c26c:369e with SMTP id ne13-20020a1709077b8d00b008b2c26c369emr32198281ejc.76.1678534985739; Sat, 11 Mar 2023 03:43:05 -0800 (PST) Received: from localhost.localdomain ([46.53.248.97]) by smtp.gmail.com with ESMTPSA id x101-20020a50baee000000b004aeeb476c5bsm1088440ede.24.2023.03.11.03.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Mar 2023 03:43:05 -0800 (PST) From: Alexey Dobriyan To: masahiroy@kernel.org Cc: adobriyan@gmail.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] menuconfig: delete shadows, prepare for vertical space reclaim Date: Sat, 11 Mar 2023 14:42:46 +0300 Message-Id: <20230311114248.36587-1-adobriyan@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760072654415886560?= X-GMAIL-MSGID: =?utf-8?q?1760072654415886560?= Shadows consumes precious vertical lines, simply delete them. Signed-off-by: Alexey Dobriyan Acked-by: Randy Dunlap Tested-by: Randy Dunlap --- scripts/kconfig/lxdialog/checklist.c | 2 -- scripts/kconfig/lxdialog/dialog.h | 1 - scripts/kconfig/lxdialog/inputbox.c | 2 -- scripts/kconfig/lxdialog/menubox.c | 2 -- scripts/kconfig/lxdialog/textbox.c | 2 -- scripts/kconfig/lxdialog/util.c | 22 ---------------------- scripts/kconfig/lxdialog/yesno.c | 2 -- 7 files changed, 33 deletions(-) diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c index fd161cfff121..7ce5233afaca 100644 --- a/scripts/kconfig/lxdialog/checklist.c +++ b/scripts/kconfig/lxdialog/checklist.c @@ -130,8 +130,6 @@ int dialog_checklist(const char *title, const char *prompt, int height, x = (getmaxx(stdscr) - width) / 2; y = (getmaxy(stdscr) - height) / 2; - draw_shadow(stdscr, y, x, height, width); - dialog = newwin(height, width, y, x); keypad(dialog, TRUE); diff --git a/scripts/kconfig/lxdialog/dialog.h b/scripts/kconfig/lxdialog/dialog.h index 68b565e3c495..50b2674b734d 100644 --- a/scripts/kconfig/lxdialog/dialog.h +++ b/scripts/kconfig/lxdialog/dialog.h @@ -206,7 +206,6 @@ void print_button(WINDOW * win, const char *label, int y, int x, int selected); void print_title(WINDOW *dialog, const char *title, int width); void draw_box(WINDOW * win, int y, int x, int height, int width, chtype box, chtype border); -void draw_shadow(WINDOW * win, int y, int x, int height, int width); int first_alpha(const char *string, const char *exempt); int dialog_yesno(const char *title, const char *prompt, int height, int width); diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c index 1dcfb288ee63..0bda6186a599 100644 --- a/scripts/kconfig/lxdialog/inputbox.c +++ b/scripts/kconfig/lxdialog/inputbox.c @@ -52,8 +52,6 @@ int dialog_inputbox(const char *title, const char *prompt, int height, int width x = (getmaxx(stdscr) - width) / 2; y = (getmaxy(stdscr) - height) / 2; - draw_shadow(stdscr, y, x, height, width); - dialog = newwin(height, width, y, x); keypad(dialog, TRUE); diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c index 58c2f8afe59b..5c3addad89b0 100644 --- a/scripts/kconfig/lxdialog/menubox.c +++ b/scripts/kconfig/lxdialog/menubox.c @@ -193,8 +193,6 @@ int dialog_menu(const char *title, const char *prompt, x = (getmaxx(stdscr) - width) / 2; y = (getmaxy(stdscr) - height) / 2; - draw_shadow(stdscr, y, x, height, width); - dialog = newwin(height, width, y, x); keypad(dialog, TRUE); diff --git a/scripts/kconfig/lxdialog/textbox.c b/scripts/kconfig/lxdialog/textbox.c index 4e339b12664e..de965d0770e2 100644 --- a/scripts/kconfig/lxdialog/textbox.c +++ b/scripts/kconfig/lxdialog/textbox.c @@ -88,8 +88,6 @@ int dialog_textbox(const char *title, char *tbuf, int initial_height, x = (getmaxx(stdscr) - width) / 2; y = (getmaxy(stdscr) - height) / 2; - draw_shadow(stdscr, y, x, height, width); - dialog = newwin(height, width, y, x); keypad(dialog, TRUE); diff --git a/scripts/kconfig/lxdialog/util.c b/scripts/kconfig/lxdialog/util.c index 3f78fb265136..72dc30e3322d 100644 --- a/scripts/kconfig/lxdialog/util.c +++ b/scripts/kconfig/lxdialog/util.c @@ -491,28 +491,6 @@ draw_box(WINDOW * win, int y, int x, int height, int width, } } -/* - * Draw shadows along the right and bottom edge to give a more 3D look - * to the boxes - */ -void draw_shadow(WINDOW * win, int y, int x, int height, int width) -{ - int i; - - if (has_colors()) { /* Whether terminal supports color? */ - wattrset(win, dlg.shadow.atr); - wmove(win, y + height, x + 2); - for (i = 0; i < width; i++) - waddch(win, winch(win) & A_CHARTEXT); - for (i = y + 1; i < y + height + 1; i++) { - wmove(win, i, x + width); - waddch(win, winch(win) & A_CHARTEXT); - waddch(win, winch(win) & A_CHARTEXT); - } - wnoutrefresh(win); - } -} - /* * Return the position of the first alphabetic character in a string. */ diff --git a/scripts/kconfig/lxdialog/yesno.c b/scripts/kconfig/lxdialog/yesno.c index bcaac9b7bab2..25e4f10e0e6a 100644 --- a/scripts/kconfig/lxdialog/yesno.c +++ b/scripts/kconfig/lxdialog/yesno.c @@ -41,8 +41,6 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width) x = (getmaxx(stdscr) - width) / 2; y = (getmaxy(stdscr) - height) / 2; - draw_shadow(stdscr, y, x, height, width); - dialog = newwin(height, width, y, x); keypad(dialog, TRUE); From patchwork Sat Mar 11 11:42:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Dobriyan X-Patchwork-Id: 68100 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp246350wrd; Sat, 11 Mar 2023 04:00:50 -0800 (PST) X-Google-Smtp-Source: AK7set93z0o0HJBjSoBYB9EhncWTJMLC+ZfpSFPoKcMV+KDdaZFSesVsKK9bnZiRMv27viGT/MHy X-Received: by 2002:a62:844e:0:b0:5a8:aabf:46f4 with SMTP id k75-20020a62844e000000b005a8aabf46f4mr26221801pfd.8.1678536050294; Sat, 11 Mar 2023 04:00:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678536050; cv=none; d=google.com; s=arc-20160816; b=EtwSNUVnlQW0Q44zzH/G7qs8V+ZbNr6qWPk0wvCU8+R8UsX3U3eXY/stgz7J8LVilD jdqEnJuwcKelhEtHmBnYzoaTrgqajkWHbWOPBUZYLlu/PURo8s6iEGHPzG570SIrA9tS st9RrLR5h8zn40zvj4Co0j17/Qq+cGkMZyelOb0lDScRFCVQdB6aJQWxWSEuIiVGZwxL hsCde3Qyon54GAk0ctNC3u7JV6na4f996jcgsS2jQ5kL9zWD10a6UyW36NgFm9E6hnmG kjO3Df78OhCS+PLcrBHKAmaKj6OwRTmRoIE/CuTS6X/u4gSKVKVQ2WC0wjcQxwkDSh+r EboA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mULnghyNJnZxFvPP0TSkUJByh26mvIxUqvGvaqhURFQ=; b=SpbBuH5wYZOj68wOWfLeCxpSqj9qIY9kgEFJj/Xl5x5q0BEzyYcRgT9ocYrHpqqwuc Lcz/nJvrVstx65DayyNguik1rIC3sLQ9bc3mbVeLK5N2U/H2ZsrP9IBdhEuWhRxy4fkn hZTPf+4eI6vjOG9dE2qZ0zsMo59nAW89DjaFxox2GlDP80bPbd5vlg3aXBNyBGJI9K+8 bn2Lj+H3Ca6HZfb1WKGOSx/QMmh+kDQNPTmsIbLfDz3f1Ub4625B+n6ncUb77ld5RsbO +N/2ODEgyov8Jxz/T6gI6S3ICWn3KLyoiqvgX3XrTT8JGVMhCeIMbmMOJ5wWAOhtV7q8 lASw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oYcx3S26; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5-20020a635105000000b004ff90ee4fd4si1976879pgb.847.2023.03.11.04.00.35; Sat, 11 Mar 2023 04:00:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oYcx3S26; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230035AbjCKLnU (ORCPT + 99 others); Sat, 11 Mar 2023 06:43:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229906AbjCKLnM (ORCPT ); Sat, 11 Mar 2023 06:43:12 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D0F6196BD; Sat, 11 Mar 2023 03:43:08 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id g10so2019686eda.1; Sat, 11 Mar 2023 03:43:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678534986; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mULnghyNJnZxFvPP0TSkUJByh26mvIxUqvGvaqhURFQ=; b=oYcx3S26706sIf8axRV0CrFa84wmfoCEyo1MVNSnnDvjGLVUv0T/AGMLEUe8auA6gd hJl2jADYXKEsuyOTMickvqEGOSO0XV0M+4vpUjoXOiwQI03QpjCFwEXDEea4LVdjoc8i 5PdWzNPb3wzkKP9FFCngLJoObd26QiHhEhdKBJKw53bq6dbu/PnBlK+TCeG3M1EaeTm6 VQfgAqULY9xTgLuL82u1z22IB78ukMxQ+a+Zy3JQSd9ngueDDBnOlEWV95Y4nP0ykou8 Y6WTBoiS2MyMlfsBdx/7upguet5SkSEVcGNRCVjVUurR7RZeBkO6+v1isAa8WZPLZK7I dWIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678534986; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mULnghyNJnZxFvPP0TSkUJByh26mvIxUqvGvaqhURFQ=; b=3pj0vZQrOeqV88lfGZZhzCkZAxNm3dE0UJqrkIqyoZpIogHnX2NzdJfan2LAV7/8qP nIc/o/OBd7WrhzPjNe23ySmRMNYGsO4hFEuFtS6/Nv94c8JwcvDTpdszuJY3++bpxTTZ NcVwOWRfLPzRh8F/WrkXlnO4yncDv+6iAr9UFD6KRR/wU+Xl6Cj4rP2b6tC9NICS+sZj bJLQ8JZozGS9K2X2rr/FDwvq+r/EH61A7hi0Za2tUpPsI1eGwUNUAISATgxcK1ZJWWvT FoIAfIsY813yM/8NjWHA+ACHA3Hcw3Y9vNoU6b4uun3HXQhwC3gDgMeRYdh3TPwClpBU xWkA== X-Gm-Message-State: AO0yUKVz639oRRoJktTbsnniZ7/LicqnlUz/hBe2hZX6heXJmIvG77gZ WcfL4YH2Hyc66z5PNeA47w== X-Received: by 2002:a05:6402:716:b0:4ab:554:37ea with SMTP id w22-20020a056402071600b004ab055437eamr26223736edx.4.1678534986609; Sat, 11 Mar 2023 03:43:06 -0800 (PST) Received: from localhost.localdomain ([46.53.248.97]) by smtp.gmail.com with ESMTPSA id x101-20020a50baee000000b004aeeb476c5bsm1088440ede.24.2023.03.11.03.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Mar 2023 03:43:06 -0800 (PST) From: Alexey Dobriyan To: masahiroy@kernel.org Cc: adobriyan@gmail.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] menuconfig: reclaim horizontal space Date: Sat, 11 Mar 2023 14:42:47 +0300 Message-Id: <20230311114248.36587-2-adobriyan@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230311114248.36587-1-adobriyan@gmail.com> References: <20230311114248.36587-1-adobriyan@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760072617425911891?= X-GMAIL-MSGID: =?utf-8?q?1760072617425911891?= Draw the menu box from position (0, 2) so that there is less unused space available. Horizontal is not _really_ important but on small terminals maybe it is. Signed-off-by: Alexey Dobriyan Tested-by: Randy Dunlap --- scripts/kconfig/lxdialog/menubox.c | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c index 5c3addad89b0..5eb67c04821f 100644 --- a/scripts/kconfig/lxdialog/menubox.c +++ b/scripts/kconfig/lxdialog/menubox.c @@ -184,7 +184,6 @@ int dialog_menu(const char *title, const char *prompt, return -ERRDISPLAYTOOSMALL; height -= 4; - width -= 5; menu_height = height - 10; max_choice = MIN(menu_height, item_count()); From patchwork Sat Mar 11 11:42:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexey Dobriyan X-Patchwork-Id: 68099 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp246283wrd; Sat, 11 Mar 2023 04:00:44 -0800 (PST) X-Google-Smtp-Source: AK7set/S3ocjLtqdB3Mu8gSjtXXmi5MXUaVwOC/WClZH44oz/FJCUTyoTN43H1Os8GgkeO1g0k98 X-Received: by 2002:a17:90a:4612:b0:23a:66:1d3a with SMTP id w18-20020a17090a461200b0023a00661d3amr29144408pjg.45.1678536044446; Sat, 11 Mar 2023 04:00:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678536044; cv=none; d=google.com; s=arc-20160816; b=LrDv6+0vSsFg/1Kj31At4g7Aem8S5Z1MyHMfYjVWROpJwECm3NufjI+F4pOdEWcXJ4 FXQghz3fP6ha+XtAQf/qYQwwl1ct+YJdh7Bh7fz1HDdZMcUM/y4ONliK9S9+mxyHsfIv MSFns5EtCy5ymootE2FXjvRXaNrzRcQBuKM1lC03MvZ26B6IeNC3JO67dXSnGvh4EcGn bPJGLGUAa5VK3mYsOUtAFG1wW+J5762kZnH3teSTu0mTde+KFC1aWeXfChP2RnTnZhId cV5RuncPpQwNPTXKFwGgGw2wn1EV+w8OGYS5wLdej6bRqamtnSOu9h0Xj0N/eMYmgQsh mCjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1D71/O6XT3CiIUnyuH8xQ8ENUScY89MVb0jVzlc2a7Q=; b=ebCPAxueVpsVRcY6iip7YpGIsFJAy+WikYvOB+62WrSPryTnRcmOGhPhZ0x2qP2yOB 2UotesGrsMYgeu0jfG8DDzmc1baVg8ZpPBh2MkMkPi1T3MrJKUvANLY8nJQKgj5U4+05 XjPXMzrdQTkfxtIru6/uqjSNPipKglQgpl90152t9FYpEz6nN2keykHn2WeVvNyqnngV XwMbgBqA2o3Ynz/l18XBXqRzbF8F4JvwByHG8n+q0wmatLT0aYcpBncvLxrtfptXZKjz FgwWw+O1kgbbfQfjsFJJsxNpIiMewxI4OBbHAJ5JjtX9s6uvVEV/ePvybNSn3ajNXEdg GcJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=q4K6gdMD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bk18-20020a17090b081200b00233c7c617e7si2007551pjb.101.2023.03.11.04.00.31; Sat, 11 Mar 2023 04:00:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=q4K6gdMD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229510AbjCKLnY (ORCPT + 99 others); Sat, 11 Mar 2023 06:43:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbjCKLnM (ORCPT ); Sat, 11 Mar 2023 06:43:12 -0500 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 059C2199D3; Sat, 11 Mar 2023 03:43:09 -0800 (PST) Received: by mail-ed1-x536.google.com with SMTP id y4so1429950edo.2; Sat, 11 Mar 2023 03:43:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678534987; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1D71/O6XT3CiIUnyuH8xQ8ENUScY89MVb0jVzlc2a7Q=; b=q4K6gdMDvO5YUhohxfUi17YD9TvFxUUWGJq9bqgCJNtOY6oYHHS2bf42UYD/m3TqB7 0JUwCPSojAxODI2JfzW8Q0WRb4qcNqIvA7E2YZHaNolsOXheJLX3Amwtaqk6DSrcL2YC UFjhVqEwyYetn9V56R+uvdSuzGKWJtkGwyXQboBb3HInjxG6mNiraXY73dNe7nna3YYY o20aKA/S4bvieCykYVN8uOb5I0suwOPRwnn2LELqoCsudJp/yr9M9ZjzVXX/OP6mVXQw HEpGRt1kXlRwbAuD+Twe5SJNKNRB7oqrmf4ff7gq6+3ZGaVvnOCE6Qzfa++d8st8ubQb recQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678534987; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1D71/O6XT3CiIUnyuH8xQ8ENUScY89MVb0jVzlc2a7Q=; b=PrHXinztmv1dYBrqldiP31o2SPlRHTfwMEL6MybF++AVJ4FJybcpW9lG78DJRFMB+x fkW6FPXUpNs1mn3FkVXOqMrKZukHbeAmtBW1YQJvipGPrcz99l4m3Dgy3q//xXkgq5fV bAVj/fCp09gZmu0lWc2cV311ErlvuQdv+FmIL+SJ3SE59M1wt0aPnInZn8r1/22JLj20 wbYs0uWz3+6iLbaE7xtebb2sVqDOq+KIhfDrD+fT1ujUjmu8P4S0XBozmSfCAC5ctgUD UV9RNguh37HP9BHtnr6UO48rHrcViiOhLEL4K0x4b9gU/NxErrwKwotuPL+nc1mMQDRY JPUQ== X-Gm-Message-State: AO0yUKWpHiFDwJM63C2Ykn5UqOMdd6Rsz94TnfhWRgQERoTXRMBsMBUW 0ySPkPHRpo4qNZwIiClYqg== X-Received: by 2002:aa7:c1c4:0:b0:4c5:bc48:d422 with SMTP id d4-20020aa7c1c4000000b004c5bc48d422mr23184335edp.7.1678534987480; Sat, 11 Mar 2023 03:43:07 -0800 (PST) Received: from localhost.localdomain ([46.53.248.97]) by smtp.gmail.com with ESMTPSA id x101-20020a50baee000000b004aeeb476c5bsm1088440ede.24.2023.03.11.03.43.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Mar 2023 03:43:07 -0800 (PST) From: Alexey Dobriyan To: masahiroy@kernel.org Cc: adobriyan@gmail.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] menuconfig: reclaim vertical space Date: Sat, 11 Mar 2023 14:42:48 +0300 Message-Id: <20230311114248.36587-3-adobriyan@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230311114248.36587-1-adobriyan@gmail.com> References: <20230311114248.36587-1-adobriyan@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760072611191130211?= X-GMAIL-MSGID: =?utf-8?q?1760072611191130211?= Menuconfig has lots of vertical space wasted: on my system there are 17 lines of useful information about config options and 14 lines of useless fluff: legend, horizontal separators and shadows. Sitation is even worse on smaller terminals because fixed vertical lines do not go away, but config option lines do, further decreasing informational density. Minimum reasonable 80×24 text console has only 10(!) lines of menus presented which is less than half of the screen. Signed-off-by: Alexey Dobriyan Acked-by: Randy Dunlap Tested-by: Randy Dunlap --- scripts/kconfig/lxdialog/menubox.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c index 5eb67c04821f..dc608914c636 100644 --- a/scripts/kconfig/lxdialog/menubox.c +++ b/scripts/kconfig/lxdialog/menubox.c @@ -183,14 +183,14 @@ int dialog_menu(const char *title, const char *prompt, if (height < MENUBOX_HEIGTH_MIN || width < MENUBOX_WIDTH_MIN) return -ERRDISPLAYTOOSMALL; - height -= 4; + height -= 2; menu_height = height - 10; max_choice = MIN(menu_height, item_count()); /* center dialog box on screen */ - x = (getmaxx(stdscr) - width) / 2; - y = (getmaxy(stdscr) - height) / 2; + x = 0; + y = 2; dialog = newwin(height, width, y, x); keypad(dialog, TRUE);