Changeset c37c24c in mainline for uspace/lib/ui/src/menuentry.c


Ignore:
Timestamp:
2024-04-07T09:52:47Z (8 weeks ago)
Author:
Nataliia Korop <n.corop08@…>
Children:
e55d2c1
Parents:
6c1e7c0 (diff), 34aad53d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'topic/packet-capture' into topic/packet-capture-choose-nic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/menuentry.c

    r6c1e7c0 rc37c24c  
    11/*
    2  * Copyright (c) 2023 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    145145                return;
    146146
     147        mentry->menu->total_h -= ui_menu_entry_height(mentry);
     148        /* NOTE: max_caption_w/max_shortcut_w not updated (speed) */
     149
    147150        list_remove(&mentry->lentries);
     151
     152        /*
     153         * If we emptied the menu, reset accumulated dims so they
     154         * can be correctly calculated when (if) the menu is
     155         * re-populated.
     156         */
     157        if (list_empty(&mentry->menu->entries)) {
     158                mentry->menu->total_h = 0;
     159                mentry->menu->max_caption_w = 0;
     160                mentry->menu->max_shortcut_w = 0;
     161        }
     162
    148163        free(mentry->caption);
    149164        free(mentry);
Note: See TracChangeset for help on using the changeset viewer.