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


Ignore:
Timestamp:
2024-02-26T13:30:48Z (12 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
d92b8e8f
Parents:
90ba06c
git-author:
Jiri Svoboda <jiri@…> (2024-02-25 16:12:29)
git-committer:
Jiri Svoboda <jiri@…> (2024-02-26 13:30:48)
Message:

Notify taskbar when start menu changes

File:
1 edited

Legend:

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

    r90ba06c ree3b28a9  
    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.